diff options
author | Blaymoira <none@none> | 2009-03-06 20:14:07 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-03-06 20:14:07 +0100 |
commit | b49732c04db0d5bf67bf78e73e9c22f2078fd47c (patch) | |
tree | e445fa32d805789d966505ffac97535152e852f6 /src/game/CreatureAI.cpp | |
parent | ba05670747d7f5cc91ce4e623f2b89ba60e8081e (diff) | |
parent | 0b9d3f95de06da9e23bdd075a286679395dab49c (diff) |
*Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureAI.cpp')
-rw-r--r-- | src/game/CreatureAI.cpp | 6 |
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)) |