From 2280ca66b81aa7c856807d298d1cf2d84355a94e Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 21 May 2009 17:24:22 -0500 Subject: *Set reactpassive when creature is calling for assistance. --HG-- branch : trunk --- src/game/IdleMovementGenerator.cpp | 9 +-------- src/game/MotionMaster.cpp | 2 ++ 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src') 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); } } -- cgit v1.2.3