From 6d62cdb1b458dbbdd5f18d158cd1579fe6348f22 Mon Sep 17 00:00:00 2001 From: crow <190869400+brighton-chi@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:29:07 -0500 Subject: [PATCH 1/2] fix(Scripts/BlackTemple): Match boss ids to DBC Black Temple kept Akama's gate event in boss slot 8, the DungeonEncounter.dbc index for Illidan, so Illidan sat in slot 9. Move the gate event to persistent data and number Illidan 8. The gate now opens on load only if Akama's scene opened it, and Akama is sent back down to his spot by the Council when the Council is dead and the gate is still shut. Co-Authored-By: Claude Opus 5.5 --- .../Outland/BlackTemple/black_temple.h | 15 ++++++++++---- .../Outland/BlackTemple/boss_illidan.cpp | 17 +++++++++++++--- .../BlackTemple/instance_black_temple.cpp | 20 +++++++++---------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index f956c312a30..4e8c113deb0 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -34,16 +34,23 @@ enum DataTypes DATA_RELIQUARY_OF_SOULS = 5, DATA_MOTHER_SHAHRAZ = 6, DATA_ILLIDARI_COUNCIL = 7, - DATA_AKAMA_ILLIDAN = 8, - DATA_ILLIDAN_STORMRAGE = 9, - MAX_ENCOUNTERS = 10, + DATA_ILLIDAN_STORMRAGE = 8, + MAX_ENCOUNTERS = 9, DATA_AKAMA_SHADE = 11, DATA_GATHIOS_THE_SHATTERER = 12, DATA_HIGH_NETHERMANCER_ZEREVOR = 13, DATA_LADY_MALANDE = 14, DATA_VERAS_DARKSHADOW = 15, - DATA_BLACK_TEMPLE_TRIGGER = 16 + DATA_BLACK_TEMPLE_TRIGGER = 16, + DATA_AKAMA_ILLIDAN = 17, + DATA_ILLIDAN_GATE = 18 +}; + +enum BTPersistentData +{ + PERSISTENT_DATA_ILLIDAN_GATE, + PERSISTENT_DATA_COUNT }; enum CreatureIds diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 8e04b8599d3..c7781101899 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -807,13 +807,24 @@ struct npc_akama_illidan : public ScriptedAI me->SetControlled(false, UNIT_STATE_ROOT); } + void JustRespawned() override + { + Reset(); + + // After a restart with the Council dead and the gate shut, return Akama to the Council + if (instance->GetBossState(DATA_ILLIDARI_COUNCIL) == DONE && + instance->GetPersistentData(PERSISTENT_DATA_ILLIDAN_GATE) != DONE && + instance->GetBossState(DATA_ILLIDAN_STORMRAGE) != DONE) + DoAction(ACTION_ILLIDARI_COUNCIL_DONE); + } + void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override { CloseGossipMenuFor(player); me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE); me->setActive(true); - if (instance->GetBossState(DATA_AKAMA_ILLIDAN) != DONE) + if (instance->GetPersistentData(PERSISTENT_DATA_ILLIDAN_GATE) != DONE) { me->GetMotionMaster()->MoveWaypoint(PATH_AKAMA_ILLIDARI_COUNCIL_2, false); } @@ -988,8 +999,8 @@ struct npc_akama_illidan : public ScriptedAI udalo->InterruptNonMeleeSpells(false); if (Creature* olum = me->FindNearestCreature(NPC_SPIRIT_OF_OLUM, 15.0f)) olum->InterruptNonMeleeSpells(false); - instance->SetBossState(DATA_AKAMA_ILLIDAN, NOT_STARTED); - instance->SetBossState(DATA_AKAMA_ILLIDAN, DONE); + instance->StorePersistentData(PERSISTENT_DATA_ILLIDAN_GATE, DONE); + instance->HandleGameObject(DATA_ILLIDAN_GATE, true); }, 50680ms); // 20ms me->m_Events.AddEventAtOffset([&] { Talk(SAY_AKAMA_SALUTE); diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 188e1386a50..6b11969ae0f 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -39,12 +39,17 @@ DoorData const doorData[] = { GO_MOTHER_SHAHRAZ_DOOR, DATA_MOTHER_SHAHRAZ, DOOR_TYPE_PASSAGE }, { GO_COUNCIL_DOOR_1, DATA_ILLIDARI_COUNCIL, DOOR_TYPE_ROOM }, { GO_COUNCIL_DOOR_2, DATA_ILLIDARI_COUNCIL, DOOR_TYPE_ROOM }, - { GO_ILLIDAN_GATE, DATA_AKAMA_ILLIDAN, DOOR_TYPE_PASSAGE }, { GO_ILLIDAN_DOOR_L, DATA_ILLIDAN_STORMRAGE, DOOR_TYPE_ROOM }, { GO_ILLIDAN_DOOR_R, DATA_ILLIDAN_STORMRAGE, DOOR_TYPE_ROOM }, { 0, 0, DOOR_TYPE_ROOM } }; +ObjectData const gameObjectData[] = +{ + { GO_ILLIDAN_GATE, DATA_ILLIDAN_GATE }, + { 0, 0 } +}; + ObjectData const creatureData[] = { { NPC_HIGH_WARLORD_NAJENTUS, DATA_HIGH_WARLORD_NAJENTUS }, @@ -102,9 +107,10 @@ class instance_black_temple : public InstanceMapScript { SetHeaders(DataHeader); SetBossNumber(MAX_ENCOUNTERS); + SetPersistentDataCount(PERSISTENT_DATA_COUNT); LoadDoorData(doorData); LoadBossBoundaries(boundaries); - LoadObjectData(creatureData, nullptr); + LoadObjectData(creatureData, gameObjectData); LoadSummonData(summonData); ashtongueGUIDs.clear(); @@ -140,15 +146,9 @@ class instance_black_temple : public InstanceMapScript void OnGameObjectCreate(GameObject* go) override { - // If created after Illidari Council is done, then skip Akama's event. Used for crashes/reset + // The gate spawns open in the DB; keep it shut until Akama's scene opens it (saved) if (go->GetEntry() == GO_ILLIDAN_GATE) - { - if (GetBossState(DATA_ILLIDARI_COUNCIL) == DONE) - { - SetBossState(DATA_AKAMA_ILLIDAN, DONE); - HandleGameObject(ObjectGuid::Empty, true, go); - } - } + HandleGameObject(ObjectGuid::Empty, GetPersistentData(PERSISTENT_DATA_ILLIDAN_GATE) == DONE, go); InstanceScript::OnGameObjectCreate(go); } From 07acc0a741ed94a0a0619ee6c0fcccb8dd0088de Mon Sep 17 00:00:00 2001 From: crow <190869400+brighton-chi@users.noreply.github.com> Date: Thu, 29 Oct 2026 21:39:29 -0500 Subject: [PATCH 2/2] fix(Scripts/BlackTemple): Read the gate data in Akama's gossip conditions Akama's gossip menu 8713 picked its text and option by boss state 8, which was the gate event and is now Illidan. After the gate scene he showed the pre-gate text again. Expose the gate's persistent value through GetData(DATA_ILLIDAN_GATE) and point the four conditions rows at it. Co-Authored-By: Claude Opus 5.5 --- .../updates/pending_db_world/rev_1793327916730492900.sql | 8 ++++++++ .../Outland/BlackTemple/instance_black_temple.cpp | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1793327916730492900.sql diff --git a/data/sql/updates/pending_db_world/rev_1793327916730492900.sql b/data/sql/updates/pending_db_world/rev_1793327916730492900.sql new file mode 100644 index 00000000000..2ac3d156e83 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1793327916730492900.sql @@ -0,0 +1,8 @@ +-- +-- Black Temple: Akama's gossip reads the Illidan gate data instead of boss state 8 (now Illidan) +UPDATE `conditions` SET `ConditionValue1` = 18, `ConditionValue3` = 0, `Comment` = 'If Illidan gate data is DONE' +WHERE `SourceTypeOrReferenceId` IN (14, 15) AND `SourceGroup` = 8713 AND `ConditionTypeOrReference` = 13 +AND `ConditionValue1` = 8 AND `ConditionValue3` = 2 AND `NegativeCondition` = 0; +UPDATE `conditions` SET `ConditionValue1` = 18, `ConditionValue3` = 0, `Comment` = 'If Illidan gate data is not DONE' +WHERE `SourceTypeOrReferenceId` IN (14, 15) AND `SourceGroup` = 8713 AND `ConditionTypeOrReference` = 13 +AND `ConditionValue1` = 8 AND `ConditionValue3` = 2 AND `NegativeCondition` = 1; diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 6b11969ae0f..5b5495ee2b0 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -153,6 +153,15 @@ class instance_black_temple : public InstanceMapScript InstanceScript::OnGameObjectCreate(go); } + uint32 GetData(uint32 type) const override + { + // Read by Akama's gossip conditions + if (type == DATA_ILLIDAN_GATE) + return GetPersistentData(PERSISTENT_DATA_ILLIDAN_GATE); + + return 0; + } + bool SetBossState(uint32 type, EncounterState state) override { if (!InstanceScript::SetBossState(type, state))