[Player] Player movement interrupt when fear/confuse fades

Should be improved due to difference between StopMoving() and InterruptMoving().
This commit is contained in:
Olion 2015-09-29 10:15:03 +03:00 committed by Antz
parent 438eaf9d18
commit 86f478283d

View File

@ -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())
{