aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureAI.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-13 17:48:57 -0600
committermegamage <none@none>2009-03-13 17:48:57 -0600
commitce4c9cb2aeca0000e6ec7cccf5ae0951ad1e1266 (patch)
tree67b9a31ea40fce6f8c6b2193a584697b018211ae /src/game/CreatureAI.cpp
parent5f2edfc7e899d7c6997e679f1b9737fb5e7e8d4d (diff)
*Allow not to switch to charmed AI for some scripts.
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureAI.cpp')
-rw-r--r--src/game/CreatureAI.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp
index 2d7eeeb18ff..9d9a3fc3a63 100644
--- a/src/game/CreatureAI.cpp
+++ b/src/game/CreatureAI.cpp
@@ -63,7 +63,12 @@ void UnitAI::DoMeleeAttackIfReady()
void PlayerAI::OnCharmed(bool apply) { me->IsAIEnabled = apply; }
//Disable CreatureAI when charmed
-void CreatureAI::OnCharmed(bool apply) { /*me->IsAIEnabled = !apply;*/ }
+void CreatureAI::OnCharmed(bool apply)
+{
+ //me->IsAIEnabled = !apply;*/
+ me->NeedChangeAI = true;
+ me->IsAIEnabled = false;
+}
void CreatureAI::MoveInLineOfSight(Unit *who)
{