mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
@@ -2673,7 +2673,7 @@ uint32 Creature::GetPetAutoSpellOnPos(uint8 pos) const
|
||||
|
||||
float Creature::GetPetChaseDistance() const
|
||||
{
|
||||
float range = MELEE_RANGE;
|
||||
float range = 0.f;
|
||||
|
||||
for (uint8 i = 0; i < GetPetAutoSpellSize(); ++i)
|
||||
{
|
||||
@@ -2683,10 +2683,8 @@ float Creature::GetPetChaseDistance() const
|
||||
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID))
|
||||
{
|
||||
if (spellInfo->GetRecoveryTime() == 0 && // No cooldown
|
||||
spellInfo->RangeEntry->ID != 1 /*Self*/ && spellInfo->RangeEntry->ID != 2 /*Combat Range*/ &&
|
||||
spellInfo->GetMinRange() > range)
|
||||
range = spellInfo->GetMinRange();
|
||||
if (spellInfo->GetRecoveryTime() == 0 && spellInfo->RangeEntry->ID != 1 /*Self*/ && spellInfo->RangeEntry->ID != 2 /*Combat Range*/ && spellInfo->GetMaxRange() > range)
|
||||
range = spellInfo->GetMaxRange();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user