mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 11:43:18 -04:00
Core/SAI: SMART_ACTION_PAUSE_MOVEMENT
Closes #22346
(cherry picked from commit 6f31784979)
This commit is contained in:
@@ -2354,18 +2354,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
target->ToUnit()->RemoveAllGameObjects();
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_REMOVE_MOVEMENT:
|
||||
case SMART_ACTION_PAUSE_MOVEMENT:
|
||||
{
|
||||
for (WorldObject* const target : targets)
|
||||
{
|
||||
if (IsUnit(target))
|
||||
{
|
||||
if (e.action.removeMovement.movementType && e.action.removeMovement.movementType < MAX_MOTION_TYPE)
|
||||
target->ToUnit()->GetMotionMaster()->Remove(MovementGeneratorType(e.action.removeMovement.movementType));
|
||||
if (e.action.removeMovement.forced)
|
||||
target->ToUnit()->StopMoving();
|
||||
}
|
||||
}
|
||||
target->ToUnit()->PauseMovement(e.action.pauseMovement.pauseTimer, e.action.pauseMovement.movementSlot, e.action.pauseMovement.force);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_RESPAWN_BY_SPAWNID:
|
||||
|
||||
Reference in New Issue
Block a user