mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
refactor(Core/Spell): Use ApplySpellFix with SpellInfo (#9938)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user