diff options
author | megamage <none@none> | 2009-06-05 14:37:15 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-05 14:37:15 -0500 |
commit | 5aa9fdb556a6d78520ee98d0f88f28c884c7e3df (patch) | |
tree | 5d0ad16c3383952834e127046a341953ae30f52d /src/game/CreatureAI.cpp | |
parent | 13fd9ea601e666ea0381d6cfafc20e316fa3f90e (diff) |
*Still use the old updatevictim functions for most scripts because some old scripts may cause crash using new function.
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureAI.cpp')
-rw-r--r-- | src/game/CreatureAI.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp index f61aca24405..143dfec99d3 100644 --- a/src/game/CreatureAI.cpp +++ b/src/game/CreatureAI.cpp @@ -149,6 +149,16 @@ bool CreatureAI::UpdateVictim() if(!me->isInCombat()) return false; + if(Unit *victim = me->SelectVictim()) + AttackStart(victim); + return me->getVictim(); +} + +bool CreatureAI::UpdateCombatState() +{ + if(!me->isInCombat()) + return false; + if(!me->HasReactState(REACT_PASSIVE)) { if(Unit *victim = me->SelectVictim()) |