diff options
| author | megamage <none@none> | 2009-03-05 18:48:56 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-05 18:48:56 -0600 |
| commit | 8787c00ca3eda49410cf9ecf2df53c2061628afd (patch) | |
| tree | a82d8ac7ddbb9f678e30260d68137fd3d7818255 /src/game/CreatureAI.cpp | |
| parent | 769c835f266c6e94e878d6e2db0118df1fa7b450 (diff) | |
*Disable charmed/possessed creature AI.
*Use general react states to replace charminfo react states.
--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)) |
