Core/Creature: 2d1ef6b5b0 followup
closes #20532 (cherry picked from commit caefe2b43e20eef28689c94c230f00fb5e61af20)
This commit is contained in:
@@ -2927,7 +2927,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)
|
||||
{
|
||||
@@ -2937,10 +2937,8 @@ float Creature::GetPetChaseDistance() const
|
||||
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID, GetMap()->GetDifficultyID()))
|
||||
{
|
||||
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