refactor(Core/Spell): Use ApplySpellFix with SpellInfo (#9938)
This commit is contained in:
parent
cfd9ebe107
commit
13643c969c
11 changed files with 1292 additions and 1268 deletions
|
|
@ -14383,7 +14383,7 @@ float Unit::GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spell
|
|||
{
|
||||
if (!spellInfo->RangeEntry)
|
||||
return 0;
|
||||
if (spellInfo->RangeEntry->maxRangeFriend == spellInfo->RangeEntry->maxRangeHostile)
|
||||
if (spellInfo->RangeEntry->RangeMin[1] == spellInfo->RangeEntry->RangeMin[0])
|
||||
return spellInfo->GetMaxRange();
|
||||
if (target == nullptr)
|
||||
return spellInfo->GetMaxRange(true);
|
||||
|
|
@ -14394,7 +14394,7 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell
|
|||
{
|
||||
if (!spellInfo->RangeEntry)
|
||||
return 0;
|
||||
if (spellInfo->RangeEntry->minRangeFriend == spellInfo->RangeEntry->minRangeHostile)
|
||||
if (spellInfo->RangeEntry->RangeMin[1] == spellInfo->RangeEntry->RangeMin[0])
|
||||
return spellInfo->GetMinRange();
|
||||
return spellInfo->GetMinRange(!IsHostileTo(target));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue