mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
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:
@@ -18129,6 +18129,15 @@ void Unit::SetControlled(bool apply, UnitState state)
|
|||||||
SetStunned(false);
|
SetStunned(false);
|
||||||
break;
|
break;
|
||||||
case UNIT_STATE_ROOT:
|
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())
|
if (HasAuraType(SPELL_AURA_MOD_ROOT) || GetVehicle())
|
||||||
return;
|
return;
|
||||||
ClearUnitState(state);
|
ClearUnitState(state);
|
||||||
|
|||||||
Reference in New Issue
Block a user