From 2802504f765ee97f50132a0d7cb214c59351ac35 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Mon, 8 Dec 2025 14:10:01 -0500 Subject: [PATCH] Core/Units: Remove unused argument from Unit::SetRooted Port From (https://github.com/TrinityCore/TrinityCore/commit/88d878375899769a894fd7edf31d5386effcd6c5) --- Source/Game/Entities/Unit/Unit.Movement.cs | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Source/Game/Entities/Unit/Unit.Movement.cs b/Source/Game/Entities/Unit/Unit.Movement.cs index 5c834dcc4..c574bfbac 100644 --- a/Source/Game/Entities/Unit/Unit.Movement.cs +++ b/Source/Game/Entities/Unit/Unit.Movement.cs @@ -1551,22 +1551,19 @@ namespace Game.Entities } } - public void SetRooted(bool apply, bool packetOnly = false) + public void SetRooted(bool apply) { - if (!packetOnly) + if (apply) { - if (apply) - { - // MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING (tested 3.3.5a) - // this will freeze clients. That's why we remove MOVEMENTFLAG_MASK_MOVING before - // setting MOVEMENTFLAG_ROOT - RemoveUnitMovementFlag(MovementFlag.MaskMoving); - AddUnitMovementFlag(MovementFlag.Root); - StopMoving(); - } - else - RemoveUnitMovementFlag(MovementFlag.Root); + // MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING (tested 3.3.5a) + // this will freeze clients. That's why we remove MOVEMENTFLAG_MASK_MOVING before + // setting MOVEMENTFLAG_ROOT + RemoveUnitMovementFlag(MovementFlag.MaskMoving); + AddUnitMovementFlag(MovementFlag.Root); + StopMoving(); } + else + RemoveUnitMovementFlag(MovementFlag.Root); Player playerMover = GetUnitBeingMoved()?.ToPlayer();// unit controlled by a player. if (playerMover != null)