From 9e91219cd3b7b9bd02d75a247053abd90d17de11 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Mon, 15 Jul 2013 13:51:51 -0230 Subject: DB/Gossip: Add missing gossip for Sputtervalve. Moved all scripting to SAI. --- src/server/scripts/Kalimdor/zone_the_barrens.cpp | 37 ------------------------ 1 file changed, 37 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index b1f6114d33f..62867c46f78 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -175,42 +175,6 @@ public: }; -/*###### -## npc_sputtervalve -######*/ - -#define GOSSIP_SPUTTERVALVE "Can you tell me about this shard?" - -class npc_sputtervalve : public CreatureScript -{ -public: - npc_sputtervalve() : CreatureScript("npc_sputtervalve") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF) - { - player->SEND_GOSSIP_MENU(2013, creature->GetGUID()); - player->AreaExploredOrEventHappens(6981); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SPUTTERVALVE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - -}; - /*###### ## npc_taskmaster_fizzule ######*/ @@ -691,7 +655,6 @@ void AddSC_the_barrens() { new npc_beaten_corpse(); new npc_gilthares(); - new npc_sputtervalve(); new npc_taskmaster_fizzule(); new npc_twiggy_flathead(); new npc_wizzlecrank_shredder(); -- cgit v1.2.3 From cff725982d2f80437b66e810996691609c331df8 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Mon, 15 Jul 2013 14:53:20 -0230 Subject: DB/Gossip: Added gossip for Morridune. --- sql/updates/world/2013_07_15_02_world_gossip.sql | 8 +++++ .../BlackfathomDeeps/blackfathom_deeps.cpp | 36 ++++++---------------- 2 files changed, 18 insertions(+), 26 deletions(-) create mode 100644 sql/updates/world/2013_07_15_02_world_gossip.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2013_07_15_02_world_gossip.sql b/sql/updates/world/2013_07_15_02_world_gossip.sql new file mode 100644 index 00000000000..9e54b17899a --- /dev/null +++ b/sql/updates/world/2013_07_15_02_world_gossip.sql @@ -0,0 +1,8 @@ +-- Gossip fixup for Morridune +UPDATE `creature_template` SET `gossip_menu_id`=321 WHERE `entry`=6729; +DELETE FROM `gossip_menu` WHERE `entry` IN (321); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (321,818); +-- Gossip Options +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (321); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES +(321,0,0, 'Please port me to Darnassus.',1,1,0); diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index b64c7c199f2..dbdd8197f72 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -201,32 +201,6 @@ class npc_morridune : public CreatureScript public: npc_morridune() : CreatureScript("npc_morridune") { } - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF + 1: - player->TeleportTo(1, 9952.239f, 2284.277f, 1341.394f, 1.595f); - player->CLOSE_GOSSIP_MENU(); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_morriduneAI(creature); - } - struct npc_morriduneAI : public npc_escortAI { npc_morriduneAI(Creature* creature) : npc_escortAI(creature) @@ -248,7 +222,17 @@ public: break; } } + + void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE + { + player->TeleportTo(1, 9952.239f, 2284.277f, 1341.394f, 1.595f); + } }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_morriduneAI(creature); + } }; void AddSC_blackfathom_deeps() -- cgit v1.2.3 From 53e50750055071f0fa5119392db2a9d1f4793cd5 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Mon, 15 Jul 2013 15:15:23 -0230 Subject: Scripting/Black Fathom Deeps: Fixed script to use proper spell. --- src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index dbdd8197f72..e74ed93bc66 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -31,8 +31,6 @@ enum Spells SPELL_TELEPORT_DARNASSUS = 9268 }; -#define GOSSIP_ITEM_MORRIDUNE "Please port me to Darnassus" - const Position HomePosition = {-815.817f, -145.299f, -25.870f, 0}; class go_blackfathom_altar : public GameObjectScript @@ -225,7 +223,7 @@ public: void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE { - player->TeleportTo(1, 9952.239f, 2284.277f, 1341.394f, 1.595f); + DoCast(player, SPELL_TELEPORT_DARNASSUS); } }; -- cgit v1.2.3 From bd3fa71d32a43cb90faf8021df55b77bbc91ec38 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Mon, 15 Jul 2013 19:57:18 -0230 Subject: DB/Gossip: Add and fix a few more gossip menus. --- sql/updates/world/2013_07_15_03_world_gossip.sql | 37 ++++++++++++ .../Kalimdor/RazorfenDowns/razorfen_downs.cpp | 70 ++++++++++++---------- 2 files changed, 77 insertions(+), 30 deletions(-) create mode 100644 sql/updates/world/2013_07_15_03_world_gossip.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2013_07_15_03_world_gossip.sql b/sql/updates/world/2013_07_15_03_world_gossip.sql new file mode 100644 index 00000000000..1193522b273 --- /dev/null +++ b/sql/updates/world/2013_07_15_03_world_gossip.sql @@ -0,0 +1,37 @@ +-- Gossip fixup for Aleanna Edune +UPDATE `creature_template` SET `gossip_menu_id`=361 WHERE `entry`=24734; +DELETE FROM `gossip_menu` WHERE `entry` IN (361); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (361,838); + +-- Gossip fixup for Marli Wishrunner +UPDATE `creature_template` SET `gossip_menu_id`=1421 WHERE `entry`=7773; +DELETE FROM `gossip_menu` WHERE `entry` IN (1421); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (1421,2053); + +-- Gossip fixup for Kalin Windflight "This guy may be missing a script" +UPDATE `creature_template` SET `gossip_menu_id`=1422 WHERE `entry`=7772; +DELETE FROM `gossip_menu` WHERE `entry` IN (1422); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (1422,2054); +-- Gossip Options +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1422); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES +(1422,0,1, 'Can you help me get down?',3,128,0); + +-- Gossip fixup for Henry Stern +UPDATE `creature_template` SET `gossip_menu_id`=1443 WHERE `entry`=8696; +DELETE FROM `gossip_menu` WHERE `entry` IN (1442,1443,1444,1501,1502); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(1442,2115),(1443,2113),(1444,2114),(1501,2173),(1502,2174); +-- Gossip Options +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1443); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES +(1443,0,0, 'You can cook? So can I! Is there a recipe you can teach me?',1,1,0), +(1443,1,0, 'You''re an alchemist? So am I. Perhaps you can teach me what you know...',1,1,0); + +-- Gossip Options Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1443; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,1443,0,0,0,7,0,185,0,0,0,0,'','Gossip Option requires cooking skill'), +(15,1443,0,0,1,25,0,13028,0,0,1,0,'','Gossip Option requires player not learned spell'), +(15,1443,1,0,0,7,0,171,0,0,0,0,'','Gossip Option requires alchemy skill'), +(15,1443,1,0,1,25,0,3451,0,0,1,0,'','Gossip Option requires player not learned spell'); diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index 516cd6a41a2..320c9970077 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -39,54 +39,64 @@ EndContentData */ enum Spells { - SPELL_GOLDTHORN_TEA = 13028, SPELL_TEACHING_GOLDTHORN_TEA = 13029, - SPELL_MIGHT_TROLLS_BLOOD_POTION = 3451, - SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION = 13030, + SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION = 13030 }; enum Gossips { - GOSSIP_TEXT_TEA_ANSWER = 2114, - GOSSIP_TEXT_POTION_ANSWER = 2115, + GOSSIP_COOKING_SKILL_HIGH = 1444, + GOSSIP_COOKING_SKILL_LOW = 1501, + GOSSIP_ALCHEMY_SKILL_HIGH = 1442, + GOSSIP_ALCHEMY_SKILL_LOW = 1502 }; -#define GOSSIP_ITEM_TEA "Teach me the cooking recipe" -#define GOSSIP_ITEM_POTION "Teach me the alchemy recipe" - class npc_henry_stern : public CreatureScript { public: npc_henry_stern() : CreatureScript("npc_henry_stern") { } - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE + struct npc_henry_sternAI : public ScriptedAI { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - player->CastSpell(player, SPELL_TEACHING_GOLDTHORN_TEA, true); - player->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, creature->GetGUID()); - } + npc_henry_sternAI(Creature* creature) : ScriptedAI(creature) { } - if (action == GOSSIP_ACTION_INFO_DEF + 2) + void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) OVERRIDE { - player->CastSpell(player, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION, true); - player->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, creature->GetGUID()); - } + if (action == 0) + { + if (player->GetBaseSkillValue(SKILL_COOKING) >= 175) + { + player->PrepareGossipMenu(me, GOSSIP_COOKING_SKILL_HIGH); + player->SendPreparedGossip(me); + DoCast(player, SPELL_TEACHING_GOLDTHORN_TEA); + } + else + { + player->PrepareGossipMenu(me, GOSSIP_COOKING_SKILL_LOW); + player->SendPreparedGossip(me); + } + } - return true; - } + if (action == 1) + { + if (player->GetBaseSkillValue(SKILL_ALCHEMY) >= 180) + { + player->PrepareGossipMenu(me, GOSSIP_ALCHEMY_SKILL_HIGH); + player->SendPreparedGossip(me); + DoCast(player, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION); + } + else + { + player->PrepareGossipMenu(me, GOSSIP_ALCHEMY_SKILL_LOW); + player->SendPreparedGossip(me); + } + } + } + }; - bool OnGossipHello(Player* player, Creature* creature) OVERRIDE + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - if (player->GetBaseSkillValue(SKILL_COOKING) >= 175 && !player->HasSpell(SPELL_GOLDTHORN_TEA)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (player->GetBaseSkillValue(SKILL_ALCHEMY) >= 180 && !player->HasSpell(SPELL_MIGHT_TROLLS_BLOOD_POTION)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_POTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; + return new npc_henry_sternAI(creature); } }; -- cgit v1.2.3