fix(Core/Unit): Prevent CTM rooted flag from being removed on aura ex… (#13732)

fix(Core/Unit): Prevent CTM rooted flag from being removed on aura expiration
This commit is contained in:
Skjalf
2022-11-08 05:44:32 -03:00
committed by GitHub
parent f5454969d1
commit b129626ee3

View File

@@ -18129,6 +18129,15 @@ void Unit::SetControlled(bool apply, UnitState state)
SetStunned(false);
break;
case UNIT_STATE_ROOT:
// Prevent creature_template_movement rooted flag from being removed on aura expiration.
if (GetTypeId() == TYPEID_UNIT)
{
if (ToCreature()->GetCreatureTemplate()->Movement.Rooted)
{
return;
}
}
if (HasAuraType(SPELL_AURA_MOD_ROOT) || GetVehicle())
return;
ClearUnitState(state);