From 5113715b051c04c2b683d4ec8b6f17920c5303ff Mon Sep 17 00:00:00 2001 From: talamortis Date: Sat, 17 Mar 2018 09:47:22 +0000 Subject: [PATCH] Upon death KT should reopen the door so people can leave. --- .../Northrend/Naxxramas/boss_kelthuzad.cpp | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index c8e99d946..a6d60dde7 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -1,4 +1,4 @@ -/* +/* * Originally written by Xinef - Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 */ @@ -165,19 +165,18 @@ public: BossAI::Reset(); events.Reset(); summons.DespawnAll(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); me->SetReactState(REACT_AGGRESSIVE); - - if (pInstance) + + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR))) { - if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR))) - { - go->SetPhaseMask(1, true); - go->SetGoState(GO_STATE_READY); - } - if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_GATE))) - go->SetGoState(GO_STATE_ACTIVE); + go->SetPhaseMask(1, true); + go->SetGoState(GO_STATE_READY); } + + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_GATE))) + go->SetGoState(GO_STATE_ACTIVE); + } void EnterEvadeMode() @@ -203,6 +202,9 @@ public: BossAI::JustDied(killer); summons.DespawnAll(); Talk(SAY_DEATH); + + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_GATE))) + go->SetGoState(GO_STATE_ACTIVE); } void MoveInLineOfSight(Unit* who)