diff options
author | megamage <none@none> | 2009-05-21 17:19:10 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-21 17:19:10 -0500 |
commit | 239919abb2036c7cd56ecbc4003dd39a03b09830 (patch) | |
tree | 4aa5bf5e65c30b51bc62b3fbda8652a2bc322dfc /src/game/CreatureAI.cpp | |
parent | 67255e536b4091e363df2276676fe5c1241c1cc4 (diff) |
*Check reactstate in UpdateVictim.
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureAI.cpp')
-rw-r--r-- | src/game/CreatureAI.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp index 465d67ded20..e9970071f23 100644 --- a/src/game/CreatureAI.cpp +++ b/src/game/CreatureAI.cpp @@ -134,12 +134,12 @@ bool CreatureAI::UpdateVictimWithGaze() return me->getVictim(); } -bool CreatureAI::UpdateVictimByReact() +bool CreatureAI::UpdateVictim() { if(!me->isInCombat()) return false; - if(me->HasReactState(REACT_AGGRESSIVE)) + if(!me->HasReactState(REACT_PASSIVE)) { if(Unit *victim = me->SelectVictim()) AttackStart(victim); @@ -154,15 +154,6 @@ bool CreatureAI::UpdateVictimByReact() return true; } -bool CreatureAI::UpdateVictim() -{ - if(!me->isInCombat()) - return false; - if(Unit *victim = me->SelectVictim()) - AttackStart(victim); - return me->getVictim(); -} - bool CreatureAI::_EnterEvadeMode() { if(me->IsInEvadeMode() || !me->isAlive()) |