mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user