refactor(Core/Spell): Use ApplySpellFix with SpellInfo (#9938)

This commit is contained in:
Kitzunu
2022-02-08 14:09:15 +01:00
committed by GitHub
parent cfd9ebe107
commit 13643c969c
11 changed files with 1292 additions and 1268 deletions

View File

@@ -723,7 +723,7 @@ void Pet::Update(uint32 diff)
if (!spellInfo)
return;
float max_range = GetSpellMaxRangeForTarget(tempspellTarget, spellInfo);
if (spellInfo->RangeEntry->type == SPELL_RANGE_MELEE)
if (spellInfo->RangeEntry->Flags == SPELL_RANGE_MELEE)
max_range -= 2 * MIN_MELEE_REACH;
if (IsWithinLOSInMap(tempspellTarget) && GetDistance(tempspellTarget) < max_range)