mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Spell): Use ApplySpellFix with SpellInfo (#9938)
This commit is contained in:
@@ -2275,8 +2275,8 @@ float SpellInfo::GetMinRange(bool positive) const
|
||||
if (!RangeEntry)
|
||||
return 0.0f;
|
||||
if (positive)
|
||||
return RangeEntry->minRangeFriend;
|
||||
return RangeEntry->minRangeHostile;
|
||||
return RangeEntry->RangeMin[1];
|
||||
return RangeEntry->RangeMin[0];
|
||||
}
|
||||
|
||||
float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
|
||||
@@ -2285,9 +2285,9 @@ float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
|
||||
return 0.0f;
|
||||
float range;
|
||||
if (positive)
|
||||
range = RangeEntry->maxRangeFriend;
|
||||
range = RangeEntry->RangeMax[1];
|
||||
else
|
||||
range = RangeEntry->maxRangeHostile;
|
||||
range = RangeEntry->RangeMax[0];
|
||||
if (caster)
|
||||
if (Player* modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(Id, SPELLMOD_RANGE, range, spell);
|
||||
|
||||
Reference in New Issue
Block a user