From e978aa8ad24484a37dce35d161d72b03280ccda8 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 30 Dec 2017 23:41:24 +0100 Subject: [PATCH] Core/Units: expand point movement checks for stop moving calls on roots and stuns from players to units --- src/server/game/Entities/Unit/Unit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c186b1da109..14008ced8dc 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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