mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
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:
@@ -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