From 056dee5d09912e054fbaf7c6f98b322e03962e06 Mon Sep 17 00:00:00 2001 From: vpinti <109848828+vpintidev@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:48:01 +0200 Subject: [PATCH] fix(Scripts/ZulAman): Load hostage gossip from DB (#27845) Co-authored-by: lee Co-authored-by: offl <11556157+offl@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- .../updates/pending_db_world/rev_1790528904226602800.sql | 7 +++++++ src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1790528904226602800.sql diff --git a/data/sql/updates/pending_db_world/rev_1790528904226602800.sql b/data/sql/updates/pending_db_world/rev_1790528904226602800.sql new file mode 100644 index 0000000000..4e5d6493c2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1790528904226602800.sql @@ -0,0 +1,7 @@ +-- Zul'Aman hostages: move the hardcoded gossip option to the DB (credit: TrinityCore) +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (8799, 8874, 8881, 8927) AND `OptionID` = 0; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(8799, 0, 0, 'Nalorakk is dead, you\'re free to go.', 23015, 1, 1, 0, 0, 0, 0, '', 0, 12340), +(8874, 0, 0, 'The coast is clear. You\'re free!', 22965, 1, 1, 0, 0, 0, 0, '', 0, 11723), +(8881, 0, 0, 'We\'ve killed your captors. You\'re free to go.\n', 23090, 1, 1, 0, 0, 0, 0, '', 0, 0), +(8927, 0, 0, 'It\'s safe, little gnome. You can come out now.', 23154, 1, 1, 0, 0, 0, 0, '', 0, 0); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 23f3a58259..b965888429 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -240,7 +240,10 @@ struct npc_forest_frog : public ScriptedAI ## npc_zulaman_hostage ######*/ -#define GOSSIP_HOSTAGE1 "I am glad to help you." +enum ZulAmanHostage +{ + GOSSIP_OPTION_HOSTAGE_FREE = 0 +}; static uint32 HostageEntry[] = {23999, 23790, 24024, 24001}; static uint32 ChestEntry[] = {187021, 186648, 186667, 186672}; @@ -282,7 +285,8 @@ public: bool OnGossipHello(Player* player, Creature* creature) override { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HOSTAGE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + uint32 const menuId = creature->GetCreatureTemplate()->GossipMenuId; + AddGossipItemFor(player, menuId, GOSSIP_OPTION_HOSTAGE_FREE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); return true; }