fix(Core/Pet): Pet chase range check for melee ranged spells (#2694)
Co-authored-by: Stoabrogga <38475780+Stoabrogga@users.noreply.github.com>
This commit is contained in:
parent
fa57954ff9
commit
19144d8bff
1 changed files with 2 additions and 0 deletions
|
|
@ -443,6 +443,8 @@ void Pet::Update(uint32 diff)
|
|||
if (!spellInfo)
|
||||
return;
|
||||
float max_range = GetSpellMaxRangeForTarget(tempspellTarget, spellInfo);
|
||||
if (spellInfo->RangeEntry->type == SPELL_RANGE_MELEE)
|
||||
max_range -= 2*MIN_MELEE_REACH;
|
||||
|
||||
if (IsWithinLOSInMap(tempspellTarget) && GetDistance(tempspellTarget) < max_range)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue