diff options
| author | click <none@none> | 2010-09-14 18:36:56 +0200 |
|---|---|---|
| committer | click <none@none> | 2010-09-14 18:36:56 +0200 |
| commit | 88d0744f1b76bb982287831aceed082335602847 (patch) | |
| tree | 52f190fd6861b6b0a759010117c6504d69f9710a /src | |
| parent | 74ca173923c53982b25a1e443fbd060990fda36c (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.cpp | 4 |
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(); } |
