aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureAI.cpp
diff options
context:
space:
mode:
authorBlaymoira <none@none>2009-03-06 20:14:07 +0100
committerBlaymoira <none@none>2009-03-06 20:14:07 +0100
commitb49732c04db0d5bf67bf78e73e9c22f2078fd47c (patch)
treee445fa32d805789d966505ffac97535152e852f6 /src/game/CreatureAI.cpp
parentba05670747d7f5cc91ce4e623f2b89ba60e8081e (diff)
parent0b9d3f95de06da9e23bdd075a286679395dab49c (diff)
*Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureAI.cpp')
-rw-r--r--src/game/CreatureAI.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp
index 409463b0052..fa512fce726 100644
--- a/src/game/CreatureAI.cpp
+++ b/src/game/CreatureAI.cpp
@@ -36,6 +36,12 @@ void UnitAI::AttackStart(Unit *victim)
}
}
+//Enable PlayerAI when charmed
+void PlayerAI::OnCharmed(bool apply) { me->IsAIEnabled = apply; }
+
+//Disable CreatureAI when charmed
+void CreatureAI::OnCharmed(bool apply) { me->IsAIEnabled = !apply; }
+
void CreatureAI::MoveInLineOfSight(Unit *who)
{
if(!me->getVictim() && me->canStartAttack(who))