diff options
| author | tkrokli <tkrokli@hotmail.com> | 2016-05-19 05:11:11 +0300 |
|---|---|---|
| committer | tkrokli <tkrokli@hotmail.com> | 2016-06-03 17:38:58 +0200 |
| commit | 3acf6f36d1d60b7e2ac082bf9f6976de3256e250 (patch) | |
| tree | 4333a308bf04770f73ef0529869b04a41dd174e5 | |
| parent | b253b694ed2ef8ee57a1c046ab80814a9a8aaa9b (diff) | |
Core/Scripts/DB: move npc_gregan_brewspewer to DB
- Remove npc_gregan_brewspewer, thereby removing hardcoded text
`#define GOSSIP_HELLO "Buy somethin', will ya?"`
- Move all gossip handling to DB (gossip texts already exist in TDB)
| -rw-r--r-- | sql/updates/world/3.3.5/2016_05_19_99_world.sql | 23 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_feralas.cpp | 50 |
2 files changed, 33 insertions, 40 deletions
diff --git a/sql/updates/world/3.3.5/2016_05_19_99_world.sql b/sql/updates/world/3.3.5/2016_05_19_99_world.sql new file mode 100644 index 00000000000..c4be18500b9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_19_99_world.sql @@ -0,0 +1,23 @@ +-- Remove outdated ScriptName from NPC 7775 Gregan Brewspewer +UPDATE `creature_template` SET `ScriptName`= '' WHERE `entry`= 7775; + +-- Remove broadcast_text link from Gregan's default gossip "What can I do for ya?" +-- to enable npc_text.ID 2433 "Hi there! The name's Gregan. What can I do for ya?" +-- This mixup is caused by invalid duplicate use of BroadcastTextID0 = 8275, +-- duplicate of npc_text.ID 5695, used by NPC entry 5167 Fenthwick <Rogue Trainer> +-- Lookup queries to verify this information: +-- SELECT * FROM `npc_text` WHERE `BroadcastTextID0`= 8275; -- (ID 2433 + 5695) +-- SELECT * FROM `gossip_menu` WHERE `text_id`= 5695; -- (4561,5695) +-- SELECT * FROM `gossip_menu_option` WHERE `menu_id`= 4561; -- (id 0,1,2,4) "I'm lookin' for rogue trainin'." +-- SELECT * FROM `creature_template` WHERE `gossip_menu_id`= 4561; -- (5167 Fenthwick <Rogue Trainer>) + +UPDATE `npc_text` SET `BroadcastTextID0`= 0 WHERE `ID`= 2433; -- old (invalid) BroadcastTextID0 : 8275 + +-- Activate selection of the next gossip menus in the gossip dialogue +UPDATE `gossip_menu_option` SET `action_menu_id`= 1801 WHERE `menu_id`= 1802 AND `id`= 0; +UPDATE `gossip_menu_option` SET `action_menu_id`= 1915 WHERE `menu_id`= 1801 AND `id`= 0; + +-- Condition for gossip_menu_option.menu_id 1802, shown in Gregan Brewspewer's default gossip menu 2433 +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 1802 AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15, 1802, 0, 0, 0, 9, 0, 3909, 0, 0, 0, 0, 0, "", "Show Gossip Menu Option menu_id 1802 id 0 if Quest 3909 is taken (active)"); diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp index 3e67a95b503..f366c3e2c19 100644 --- a/src/server/scripts/Kalimdor/zone_feralas.cpp +++ b/src/server/scripts/Kalimdor/zone_feralas.cpp @@ -19,10 +19,15 @@ /* ScriptData SDName: Feralas SD%Complete: 100 -SDComment: Quest support: 2767, Special vendor Gregan Brewspewer +SDComment: Quest support: 2767, 2987 SDCategory: Feralas EndScriptData */ +/* ContentData +npc_oox22fe +spell_gordunni_trap +EndContentData */ + #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" @@ -32,44 +37,6 @@ EndScriptData */ #include "WorldSession.h" /*###### -## npc_gregan_brewspewer -######*/ - -#define GOSSIP_HELLO "Buy somethin', will ya?" - -class npc_gregan_brewspewer : public CreatureScript -{ -public: - npc_gregan_brewspewer() : CreatureScript("npc_gregan_brewspewer") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - player->SEND_GOSSIP_MENU(2434, creature->GetGUID()); - } - if (action == GOSSIP_ACTION_TRADE) - player->GetSession()->SendListInventory(creature->GetGUID()); - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (creature->IsVendor() && player->GetQuestStatus(3909) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(2433, creature->GetGUID()); - return true; - } - -}; - -/*###### ## npc_oox22fe ######*/ @@ -183,6 +150,10 @@ public: }; +/*###### +## spell_gordunni_trap +######*/ + enum GordunniTrap { GO_GORDUNNI_DIRT_MOUND = 144064, @@ -225,7 +196,6 @@ class spell_gordunni_trap : public SpellScriptLoader void AddSC_feralas() { - new npc_gregan_brewspewer(); new npc_oox22fe(); new spell_gordunni_trap(); } |
