diff options
author | megamage <none@none> | 2009-05-21 17:24:22 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-21 17:24:22 -0500 |
commit | 2280ca66b81aa7c856807d298d1cf2d84355a94e (patch) | |
tree | a2dae36031abaa9d773b4b763446bf7e4078f0fb | |
parent | 239919abb2036c7cd56ecbc4003dd39a03b09830 (diff) |
*Set reactpassive when creature is calling for assistance.
--HG--
branch : trunk
-rw-r--r-- | src/game/IdleMovementGenerator.cpp | 9 | ||||
-rw-r--r-- | src/game/MotionMaster.cpp | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/game/IdleMovementGenerator.cpp b/src/game/IdleMovementGenerator.cpp index 44575302e75..17e777db240 100644 --- a/src/game/IdleMovementGenerator.cpp +++ b/src/game/IdleMovementGenerator.cpp @@ -65,12 +65,5 @@ void AssistanceDistractMovementGenerator::Finalize(Unit &unit) { unit.clearUnitState(UNIT_STAT_DISTRACTED); - if (Unit* victim = unit.getVictim()) - { - if (unit.isAlive()) - { - unit.AttackStop(); - ((Creature*)&unit)->AI()->AttackStart(victim); - } - } + ((Creature*)&unit)->SetReactState(REACT_AGGRESSIVE); } diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index f8241987d16..3a7832fe914 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -375,6 +375,8 @@ MotionMaster::MoveSeekAssistance(float x, float y, float z) { DEBUG_LOG("Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)", i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z ); + i_owner->AttackStop(); + ((Creature*)i_owner)->SetReactState(REACT_PASSIVE); Mutate(new AssistanceMovementGenerator(x,y,z), MOTION_SLOT_ACTIVE); } } |