fix(Core/Units): Clear any movement on charm. (#11826)

Fixes #10343
This commit is contained in:
UltraNix
2022-05-23 11:04:27 +02:00
committed by GitHub
parent c331d8822b
commit b638d44693

View File

@@ -17930,14 +17930,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
if (GetTypeId() == TYPEID_UNIT)
{
if (MovementGenerator* movementGenerator = GetMotionMaster()->GetMotionSlot(MOTION_SLOT_IDLE))
{
movementGenerator->Pause(0);
}
GetMotionMaster()->Clear(MOTION_SLOT_ACTIVE);
StopMoving();
GetMotionMaster()->MoveIdle();
if (charmer->GetTypeId() == TYPEID_PLAYER &&
charmer->getClass() == CLASS_WARLOCK)