mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
*Set reactpassive when creature is calling for assistance.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user