From 0f628c05bbf98624fa159c1423ce987586eb9630 Mon Sep 17 00:00:00 2001 From: XandrNiko Date: Sun, 5 Nov 2023 03:33:40 +0300 Subject: [PATCH] Magtheridon: Fix door to boss magtheridon Closes https://github.com/cmangos/mangos-tbc/pull/638 --- .../magtheridons_lair/magtheridons_lair.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.cpp b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.cpp index c38ef6b543..2c805372fd 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.cpp @@ -127,11 +127,10 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) m_uiCageBreakTimer = 0; m_uiCageBreakStage = 0; - // no break; + [[fallthrough]]; case DONE: // Reset door on Fail or Done - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) - pDoor->ResetDoorOrButton(); + DoUseOpenableObject(GO_DOODAD_HF_MAG_DOOR01, true); SetData(TYPE_CHANNELER_EVENT, DONE); break; @@ -164,8 +163,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) m_uiCageBreakStage = 0; // Reset door on Fail - if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_DOODAD_HF_MAG_DOOR01)) - pDoor->ResetDoorOrButton(); + DoUseOpenableObject(GO_DOODAD_HF_MAG_DOOR01, true); // Reset Magtheridon if (Creature* pMagtheridon = GetSingleCreatureFromStorage(NPC_MAGTHERIDON)) @@ -187,7 +185,7 @@ void instance_magtheridons_lair::SetData(uint32 uiType, uint32 uiData) } // combat door - DoUseDoorOrButton(GO_DOODAD_HF_MAG_DOOR01); + DoUseOpenableObject(GO_DOODAD_HF_MAG_DOOR01, false); } m_auiEncounter[uiType] = uiData; break;