aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclick <none@none>2010-09-14 18:36:56 +0200
committerclick <none@none>2010-09-14 18:36:56 +0200
commit88d0744f1b76bb982287831aceed082335602847 (patch)
tree52f190fd6861b6b0a759010117c6504d69f9710a /src
parent74ca173923c53982b25a1e443fbd060990fda36c (diff)
Core/PetAI: Make pets respect being in passive mode (fixes a few "stuck in front of target"-issues with pets on certain occations)
- setting pet into passive mode before reaching its target (after an attack-command) will break attack (return "home" to follow/stay position) - setting pet into passive mode and fully attacking target will make it return home properly --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index bd5b45bdf3b..f975f3f96ba 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -96,7 +96,7 @@ void PetAI::UpdateAI(const uint32 diff)
{
if (_needToStop())
{
- sLog.outStaticDebug("Pet AI stoped attacking [guid=%u]", me->GetGUIDLow());
+ sLog.outStaticDebug("Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
_stopAttack();
return;
}
@@ -109,6 +109,8 @@ void PetAI::UpdateAI(const uint32 diff)
if (nextTarget)
AttackStart(nextTarget);
+ if (me->HasReactState(REACT_PASSIVE))
+ _stopAttack();
else
HandleReturnMovement();
}