mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
Merge pull request #9142 from m7nu3l/patch-4
Core/MovementGenerator: Now MovementInform event is called at the truly end of Finalize function. Thanks Trista
This commit is contained in:
@@ -128,8 +128,6 @@ void EffectMovementGenerator::Finalize(Unit* unit)
|
||||
if (unit->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
if (unit->ToCreature()->AI())
|
||||
unit->ToCreature()->AI()->MovementInform(EFFECT_MOTION_TYPE, m_Id);
|
||||
// Need restore previous movement since we have no proper states system
|
||||
if (unit->isAlive() && !unit->HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_FLEEING))
|
||||
{
|
||||
@@ -138,4 +136,7 @@ void EffectMovementGenerator::Finalize(Unit* unit)
|
||||
else
|
||||
unit->GetMotionMaster()->Initialize();
|
||||
}
|
||||
|
||||
if (unit->ToCreature()->AI())
|
||||
unit->ToCreature()->AI()->MovementInform(EFFECT_MOTION_TYPE, m_Id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user