diff options
author | gvcoman <none@none> | 2008-11-22 16:55:17 -0500 |
---|---|---|
committer | gvcoman <none@none> | 2008-11-22 16:55:17 -0500 |
commit | 915bc1acdac918f6a1c3017527e072652f59a613 (patch) | |
tree | c45fe9418b6dd7fe2dc0a6d1c2c79094635cb74b /src/game/AggressorAI.cpp | |
parent | bd5ee9e49ef2fa0e6503887f314e6d515505140e (diff) |
Make summoned creatures go back to summoner on evade if summoner is alive. This should take care of most (all?) errors about controlled creatures trying to target home.
--HG--
branch : trunk
Diffstat (limited to 'src/game/AggressorAI.cpp')
-rw-r--r-- | src/game/AggressorAI.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/AggressorAI.cpp b/src/game/AggressorAI.cpp index 0c45fff79f4..04e4f997e7f 100644 --- a/src/game/AggressorAI.cpp +++ b/src/game/AggressorAI.cpp @@ -98,7 +98,7 @@ void AggressorAI::EnterEvadeMode() //i_tracker.Reset(TIME_INTERVAL_LOOK); } - if(!i_creature.isCharmed()) + if(!i_creature.GetCharmerOrOwner()) { i_creature.RemoveAllAuras(); @@ -106,6 +106,8 @@ void AggressorAI::EnterEvadeMode() if( i_creature.GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE ) i_creature.GetMotionMaster()->MoveTargetedHome(); } + else if (i_creature.GetOwner() && i_creature.GetOwner()->isAlive()) + i_creature.GetMotionMaster()->MoveFollow(owner,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE); i_creature.DeleteThreatList(); i_victimGuid = 0; |