Core/Movement: use helpers for validation
Port From (https://github.com/TrinityCore/TrinityCore/commit/0b6049fe0bf49a8c21114960cb7a6522f48c8308)
This commit is contained in:
@@ -169,7 +169,7 @@ namespace Game.Entities
|
||||
|
||||
public void PauseMovement(uint timer = 0, MovementSlot slot = 0, bool forced = true)
|
||||
{
|
||||
if (slot >= MovementSlot.Max)
|
||||
if (MotionMaster.IsInvalidMovementSlot(slot))
|
||||
return;
|
||||
|
||||
IMovementGenerator movementGenerator = GetMotionMaster().GetMotionSlot(slot);
|
||||
@@ -182,7 +182,7 @@ namespace Game.Entities
|
||||
|
||||
public void ResumeMovement(uint timer = 0, MovementSlot slot = 0)
|
||||
{
|
||||
if (slot >= MovementSlot.Max)
|
||||
if (MotionMaster.IsInvalidMovementSlot(slot))
|
||||
return;
|
||||
|
||||
IMovementGenerator movementGenerator = GetMotionMaster().GetMotionSlot(slot);
|
||||
|
||||
Reference in New Issue
Block a user