Scripts/EoE: Attempt to fix players getting stuck after dying

Attempt to fix players getting stuck after dying caused by a hack that calls SetControlled(true, UNIT_STATE_ROOT) by calling the opposite when a dead player leaves the instance, i.e. on releasing.
Close #24458

(cherry picked from commit dc21ac342ec3293ecf37b6a87244c46a39ff687f)
This commit is contained in:
jackpoz
2022-03-06 19:00:26 +01:00
committed by Shauren
parent a4a3e2e759
commit 3886c82d0f
@@ -55,6 +55,12 @@ public:
player->CastSpell(player, SPELL_SUMMOM_RED_DRAGON_BUDDY, true);
}
void OnPlayerLeave(Player* player) override
{
if (!player->IsAlive())
player->SetControlled(false, UNIT_STATE_ROOT);
}
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))