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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user