From 86f478283d2ed7176e8cdebb6471ed4ea2193cc0 Mon Sep 17 00:00:00 2001 From: Olion Date: Tue, 29 Sep 2015 10:15:03 +0300 Subject: [PATCH] [Player] Player movement interrupt when fear/confuse fades Should be improved due to difference between StopMoving() and InterruptMoving(). --- src/game/Object/Unit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index 5472dbd5..1198c885 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -8531,6 +8531,8 @@ void Unit::SetFeared(bool apply, ObjectGuid casterGuid, uint32 spellID, uint32 t RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING); GetMotionMaster()->MovementExpired(GetTypeId() == TYPEID_PLAYER); + if (GetTypeId() == TYPEID_PLAYER) + InterruptMoving(true); if (GetTypeId() != TYPEID_PLAYER && IsAlive()) { @@ -8574,6 +8576,8 @@ void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID) RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); GetMotionMaster()->MovementExpired(GetTypeId() == TYPEID_PLAYER); + if (GetTypeId() == TYPEID_PLAYER) + InterruptMoving(true); if (GetTypeId() != TYPEID_PLAYER && IsAlive()) {