Core/AI: replaced SMART_ACTION_STOP_MOTION with new functionality called SMART_ACTION_PAUSE_MOVEMENT

This commit is contained in:
Ovahlord committed 2020-02-18 22:13:33 +01:00
1 parent ea32427608
commit 6dce62f0fd
3 files changed
+13 -14

No files matched your search

@@ -2355,18 +2355,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
}
case SMART_ACTION_STOP_MOTION:
case SMART_ACTION_PAUSE_MOVEMENT:
{
for (WorldObject* target : targets)
{
if (IsUnit(target))
{
if (e.action.stopMotion.stopMovement)
target->ToUnit()->StopMoving();
if (e.action.stopMotion.movementExpired)
target->ToUnit()->GetMotionMaster()->MovementExpired();
}
}
target->ToUnit()->PauseMovement(e.action.pauseMovement.pauseTimer, e.action.pauseMovement.movementSlot, e.action.pauseMovement.force);
break;
}
case SMART_ACTION_RESPAWN_BY_SPAWNID: