Fix for pets moving from stay during combat

Closes #5612
This commit is contained in:
MrSmite
2012-03-16 15:53:07 -04:00
parent c0165ec7f8
commit a26e145ae7

View File

@@ -457,7 +457,7 @@ bool PetAI::CanAttack(Unit* target)
// Stay - can attack if target is within range or commanded to
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
return (me->IsWithinMeleeRange(target, MIN_MELEE_REACH) || me->GetCharmInfo()->IsCommandAttack());
return (me->IsWithinMeleeRange(target, MELEE_RANGE) || me->GetCharmInfo()->IsCommandAttack());
// Follow
if (me->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))