aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShocker <shocker@freakz.ro>2012-03-16 15:00:09 -0700
committerShocker <shocker@freakz.ro>2012-03-16 15:00:09 -0700
commit97f5a06d34285d4a22e2ecb94880982ef7c95256 (patch)
tree12a6db0b824d749d05141cfd8ab088ce66634681 /src
parentaad4e41ca5f9bd94fbb6aef37c569543f239a42b (diff)
parenta26e145ae755173af574d1f4c8a9b66e8e435b86 (diff)
Merge pull request #5742 from MrSmite/PetAI_1
Core/Pets: Correctly obey the stay command for pets when attacking in melee range
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index eedba4d8b7e..985eafaf703 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -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))