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
This commit is contained in:
jackpoz
2021-01-30 20:48:18 +01:00
parent d5fc86af8b
commit dc21ac342e

View File

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