mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Units: expand point movement checks for stop moving calls on roots and stuns from players to units
This commit is contained in:
@@ -11816,8 +11816,8 @@ void Unit::SetStunned(bool apply)
|
||||
SetTarget(ObjectGuid::Empty);
|
||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
|
||||
// Stop movement if a player is affected by point motion master
|
||||
if (GetTypeId() == TYPEID_PLAYER && GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
// Stop movement if unit is affected by point motion master
|
||||
if (GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
StopMoving();
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -11852,8 +11852,8 @@ void Unit::SetRooted(bool apply, bool packetOnly /*= false*/)
|
||||
// setting MOVEMENTFLAG_ROOT
|
||||
RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING);
|
||||
AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
|
||||
// Stop movement if a player is currently affected by point motion master
|
||||
if (GetTypeId() == TYPEID_PLAYER && GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
// Stop movement if unit is affected by point motion master
|
||||
if (GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
StopMoving();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user