aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-09-22 10:56:41 +0100
committerNay <dnpd.dd@gmail.com>2012-09-22 10:56:41 +0100
commit95d713ac6f53a270be879b6661c3d988607261c5 (patch)
treee6be56757cba94dcd25af666a77386f25d16e1f2 /src/server/game/AI/CreatureAI.cpp
parent7090197c6ade85e1b223d3cb46923b89133f89a5 (diff)
parent5faa9d37b4240223a86939b4d898ec666e71f0c0 (diff)
Merge remote-tracking branch 'origin/master' into 4.3.4
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rwxr-xr-xsrc/server/game/AI/CreatureAI.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 17cef3ec1a1..e5868117da8 100755
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -153,13 +153,20 @@ void CreatureAI::EnterEvadeMode()
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
}
else
+ {
+ // Required to prevent attacking creatures that are evading and cause them to reenter combat
+ // Does not apply to MoveFollow
+ me->AddUnitState(UNIT_STATE_EVADE);
me->GetMotionMaster()->MoveTargetedHome();
+ }
}
Reset();
if (me->IsVehicle()) // use the same sequence of addtoworld, aireset may remove all summons!
me->GetVehicleKit()->Reset(true);
+
+ me->SetLastDamagedTime(0);
}
/*void CreatureAI::AttackedBy(Unit* attacker)