Core/Units: Remove unused argument from Unit::SetRooted
Port From (https://github.com/TrinityCore/TrinityCore/commit/88d878375899769a894fd7edf31d5386effcd6c5)
This commit is contained in:
@@ -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
|
||||||
// MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING (tested 3.3.5a)
|
// setting MOVEMENTFLAG_ROOT
|
||||||
// this will freeze clients. That's why we remove MOVEMENTFLAG_MASK_MOVING before
|
RemoveUnitMovementFlag(MovementFlag.MaskMoving);
|
||||||
// setting MOVEMENTFLAG_ROOT
|
AddUnitMovementFlag(MovementFlag.Root);
|
||||||
RemoveUnitMovementFlag(MovementFlag.MaskMoving);
|
StopMoving();
|
||||||
AddUnitMovementFlag(MovementFlag.Root);
|
|
||||||
StopMoving();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
RemoveUnitMovementFlag(MovementFlag.Root);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
RemoveUnitMovementFlag(MovementFlag.Root);
|
||||||
|
|
||||||
Player playerMover = GetUnitBeingMoved()?.ToPlayer();// unit controlled by a player.
|
Player playerMover = GetUnitBeingMoved()?.ToPlayer();// unit controlled by a player.
|
||||||
if (playerMover != null)
|
if (playerMover != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user