aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlee <leelf_00@126.com>2022-04-08 09:43:57 +0800
committerShauren <shauren.trinity@gmail.com>2022-06-10 16:13:23 +0200
commit6d805a653b17ab31dd0db611f737d19cc6324a8d (patch)
treea8215dda868f9159f25827a2360980da72a67516
parentc16cafc8071822b924355e5e3b844c9dc5fda3a8 (diff)
Scripts/Misc: Load gossip options from DB (#27892)
(cherry picked from commit 5a20861565c6de3ed0312bb82fbf5bb048f0f8f4)
-rw-r--r--sql/updates/world/master/2022_06_10_08_world_2022_04_08_01_world.sql32
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp47
-rw-r--r--src/server/scripts/Kalimdor/zone_thunder_bluff.cpp9
3 files changed, 39 insertions, 49 deletions
diff --git a/sql/updates/world/master/2022_06_10_08_world_2022_04_08_01_world.sql b/sql/updates/world/master/2022_06_10_08_world_2022_04_08_01_world.sql
new file mode 100644
index 00000000000..280f11ec3fe
--- /dev/null
+++ b/sql/updates/world/master/2022_06_10_08_world_2022_04_08_01_world.sql
@@ -0,0 +1,32 @@
+--
+-- ALTER TABLE `gossip_menu_option` MODIFY `VerifiedBuild` int(11) NOT NULL DEFAULT '0';
+
+-- Quest Chasing the Moonstone (11194)
+-- DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (57025) AND `OptionID` IN (0);
+-- INSERT INTO `gossip_menu_option`(`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
+-- (57025, 0, 0, 'Hand over the Southfury moonstone and I\'ll let you go.', 20723, 1, 1, 0, 0, 0, 0, NULL, 0, 0);
+
+-- Quest Cairne's Hoofprint (925), credit: vmangos
+DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (5851) AND `OptionID` IN (0);
+INSERT INTO `gossip_menu_option`(`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
+(5851, 0, 0, 'Chief Bloodhoof, this may sound like an odd request... but I have a young ward who is quite shy. You are a hero to him, and he asked me to get your hoofprint.', 9670, 1, 1, 5852, 0, 0, 0, NULL, 0, 34219);
+
+DELETE FROM `gossip_menu` WHERE `MenuID` = 5852 AND `TextID` = 7014;
+INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES
+(5852,7014,34219);
+
+-- ZulAman
+DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (8799,8874,8927,8881) AND `OptionID` IN (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, NULL, 0, 12340),
+(8874, 0, 0, "The coast is clear. You're free!", 22965, 1, 1, 0, 0, 0, 0, NULL, 0, 11723),
+(8927, 0, 0, "It's safe, little gnome. You can come out now.", 23154, 1, 1, 0, 0, 0, 0, NULL, 0, 0),
+(8881, 0, 0, "We've killed your captors. You're free to go.
+", 23090, 1, 1, 0, 0, 0, 0, NULL, 0, 0);
+
+-- MGT
+UPDATE `gossip_menu_option` SET `ActionMenuID` = 9200 WHERE `MenuID` = 9199 AND `OptionID` = 0;
+UPDATE `gossip_menu_option` SET `ActionMenuID` = 9297 WHERE `MenuID` = 9199 AND `OptionID` = 1;
+UPDATE `gossip_menu_option` SET `ActionMenuID` = 9201 WHERE `MenuID` = 9200 AND `OptionID` = 0;
+UPDATE `gossip_menu_option` SET `ActionMenuID` = 9295 WHERE `MenuID` = 9297 AND `OptionID` = 0;
+UPDATE `gossip_menu_option` SET `ActionMenuID` = 9296 WHERE `MenuID` = 9297 AND `OptionID` = 1;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
index 4eec707d18f..d53c63a3acd 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
@@ -56,12 +56,6 @@ enum EventIds
EVENT_KALECGOS_LANDING = 2
};
-#define GOSSIP_ITEM_KAEL_1 "Who are you?"
-#define GOSSIP_ITEM_KAEL_2 "What can we do to assist you?"
-#define GOSSIP_ITEM_KAEL_3 "What brings you to the Sunwell?"
-#define GOSSIP_ITEM_KAEL_4 "You're not alone here?"
-#define GOSSIP_ITEM_KAEL_5 "What would Kil'jaeden want with a mortal woman?"
-
class npc_kalecgos : public CreatureScript
{
public:
@@ -107,47 +101,6 @@ public:
}
}
- bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
- {
- uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
- ClearGossipMenuFor(player);
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF:
- AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_KAEL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- SendGossipMenuFor(player, 12500, me->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 1:
- AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_KAEL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- SendGossipMenuFor(player, 12502, me->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_KAEL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- SendGossipMenuFor(player, 12606, me->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 3:
- AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_KAEL_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
- SendGossipMenuFor(player, 12607, me->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 4:
- SendGossipMenuFor(player, 12608, me->GetGUID());
- break;
- }
-
- return true;
- }
-
- bool OnGossipHello(Player* player) override
- {
- if (me->IsQuestGiver())
- player->PrepareQuestMenu(me->GetGUID());
-
- AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_KAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- SendGossipMenuFor(player, 12498, me->GetGUID());
-
- return true;
- }
-
private:
EventMap events;
};
diff --git a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
index 96f4ca3d46a..ba842f5f9ad 100644
--- a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
+++ b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
@@ -45,7 +45,12 @@ enum Sounds
SOUND_AGGRO = 5884
};
-#define GOSSIP_HCB "I know this is rather silly but a young ward who is a bit shy would like your hoofprint."
+enum Gossips
+{
+ GOSSIP_MENU_HCB = 5851,
+ GOSSIP_OPTION_HCB = 0
+};
+
/// @todo verify abilities/timers
class npc_cairne_bloodhoof : public CreatureScript
{
@@ -141,7 +146,7 @@ public:
player->PrepareQuestMenu(me->GetGUID());
if (player->GetQuestStatus(925) == QUEST_STATUS_INCOMPLETE)
- AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_HCB, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO);
+ AddGossipItemFor(player, GOSSIP_MENU_HCB, GOSSIP_OPTION_HCB, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO);
SendGossipMenuFor(player, 7013, me->GetGUID());