diff --git a/data/sql/updates/pending_db_world/rev_1716655119634919952.sql b/data/sql/updates/pending_db_world/rev_1716655119634919952.sql new file mode 100644 index 00000000000000..38cbe1cc4ccd2b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1716655119634919952.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_text` WHERE (`CreatureID` = 22515) AND (`GroupID` = 19); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(22515, 19, 0, 'The Ancient Gate of the Keepers unlocks!', 41, 0, 100, 0, 0, 0, 34401, 0, 'Ulduar - The Ancient Gate of the Keepers unlocks!'); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 53655941a44751..6483985e58dc32 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -127,6 +127,9 @@ class instance_ulduar : public InstanceMapScript ObjectGuid m_brannBronzebeardBaseCamp; uint32 m_algalonTimer; + // Ancient Gate + const Position triggerAncientGatePosition = { 1883.65f, 269.272f, 418.406f }; + // Shared EventMap _events; bool m_mimironTramUsed; @@ -671,8 +674,17 @@ class instance_ulduar : public InstanceMapScript m_auiEncounter[type] = data; if (GetData(TYPE_MIMIRON) == DONE && GetData(TYPE_FREYA) == DONE && GetData(TYPE_HODIR) == DONE && GetData(TYPE_THORIM) == DONE) { - if (GameObject* go = instance->GetGameObject(m_keepersgateGUID)) - go->RemoveGameObjectFlag(GO_FLAG_LOCKED); + scheduler.Schedule(45s, [this](TaskContext /*context*/) + { + if (GameObject* go = instance->GetGameObject(m_keepersgateGUID)) + { + go->RemoveGameObjectFlag(GO_FLAG_LOCKED); + if (Creature* trigger = instance->SummonCreature(NPC_ANCIENT_GATE_WORLD_TRIGGER, triggerAncientGatePosition, nullptr, 10*IN_MILLISECONDS)) + { + trigger->AI()->Talk(EMOTE_ANCIENT_GATE_UNLOCKED); + } + } + }); } if (type == TYPE_MIMIRON && data == IN_PROGRESS) // after reaching him without tram and starting the fight m_mimironTramUsed = true; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h index e7301a3c13af19..fb043172230c74 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h @@ -291,6 +291,10 @@ enum UlduarMisc // Freya, Hodir, Mimiron, Thorim EVENT_KEEPER_TELEPORTED = 62941, + // Ancient Gate + NPC_ANCIENT_GATE_WORLD_TRIGGER = 22515, + EMOTE_ANCIENT_GATE_UNLOCKED = 19, + // Yogg-Saron ACTION_SARA_UPDATE_SUMMON_KEEPERS = 4, KEEPER_FREYA = 0,