diff --git a/sql/migrations/20181013160102_world.sql b/sql/migrations/20181013160102_world.sql new file mode 100644 index 000000000..9dc1e65e4 --- /dev/null +++ b/sql/migrations/20181013160102_world.sql @@ -0,0 +1,50 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20181013160102'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20181013160102'); +-- Add your query below. + + + +-- Gossip menu for Kalaran Windblade. +DELETE FROM `npc_gossip` WHERE `npc_guid`=5921; +INSERT INTO `conditions` VALUES (250, 9, 3441, 1, 0, 0, 0); -- Has Incomplete Quest Divine Retribution +INSERT INTO `conditions` VALUES (251, 8, 3454, 0, 0, 0, 0); -- Completed Quest The Torch of Retribution +INSERT INTO `conditions` VALUES (252, 2, 10515, 1, 0, 0, 1); -- Not Have Item Torch of Retribution +INSERT INTO `conditions` VALUES (253, -1, 251, 252, 0, 0, 0); +INSERT INTO `gossip_menu` VALUES (1323, 1953, 0); +INSERT INTO `gossip_menu` VALUES (1322, 1954, 0); +INSERT INTO `gossip_menu` VALUES (1321, 1955, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `condition_id`) VALUES (1323, 0, 0, 'Tell me what drives this vengeance?', 4430, 1, 1, 1322, 0, 0, 0, 0, '', 0, 250); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `condition_id`) VALUES (1323, 2, 0, 'Kalaran, I have misplaced my torch. I require another.', 7773, 1, 1, -1, 0, 1323, 0, 0, '', 0, 253); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `condition_id`) VALUES (1322, 0, 0, 'Continue please.', 4432, 1, 1, 1321, 0, 0, 0, 0, '', 0, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `condition_id`) VALUES (1321, 0, 0, 'Let me confer with my colleagues.', 4434, 1, 1, -1, 0, 1321, 0, 0, '', 0, 0); +DELETE FROM `gossip_scripts` WHERE `id`=1323; +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES (1323, 0, 15, 19797, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalaran Windblade - Cast Spell Conjure Torch of Retribution'); +DELETE FROM `gossip_scripts` WHERE `id`=1321; +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES (1321, 0, 7, 3441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalaran Windblade - Complete Quest Divine Retribution'); +UPDATE `creature_template` SET `gossip_menu_id`=1323, `ScriptName`='' WHERE `entry`=8479; + +-- Gossip menu for Zamael Lunthistle. +INSERT INTO `conditions` VALUES (254, 9, 3377, 1, 0, 0, 0); -- Has Incomplete Quest Prayer to Elune +INSERT INTO `gossip_menu` VALUES (1285, 1920, 0); +INSERT INTO `gossip_menu` VALUES (1286, 1922, 0); +INSERT INTO `gossip_menu` VALUES (1287, 1921, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `condition_id`) VALUES (1285, 0, 0, 'I wish to hear your tale.', 4408, 1, 1, 1287, 0, 0, 0, 0, '', 0, 254); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `condition_id`) VALUES (1287, 0, 0, 'Please continue, Zamael.', 4410, 1, 1, 1286, 0, 0, 0, 0, '', 0, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `condition_id`) VALUES (1286, 0, 0, 'Let me think about it, Zamael.', 4412, 1, 1, -1, 0, 1286, 0, 0, '', 0, 0); +DELETE FROM `gossip_scripts` WHERE `id`=1286; +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES (1286, 0, 7, 3377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Zamael Lunthistle - Complete Quest Prayer to Elune'); +UPDATE `creature_template` SET `gossip_menu_id`=1285, `ScriptName`='' WHERE `entry`=8436; + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/scripts/eastern_kingdoms/searing_gorge/searing_gorge.cpp b/src/scripts/eastern_kingdoms/searing_gorge/searing_gorge.cpp index c32e68fa3..5bad3bc19 100644 --- a/src/scripts/eastern_kingdoms/searing_gorge/searing_gorge.cpp +++ b/src/scripts/eastern_kingdoms/searing_gorge/searing_gorge.cpp @@ -17,55 +17,17 @@ /* ScriptData SDName: Searing_Gorge SD%Complete: 80 -SDComment: Quest support: 3377, 3441 (More accurate info on Kalaran needed). Lothos Riftwaker teleport to Molten Core. +SDComment: Quest support: Lothos Riftwaker teleport to Molten Core. SDCategory: Searing Gorge EndScriptData */ /* ContentData -npc_kalaran_windblade npc_lothos_riftwaker npc_zamael_lunthistle EndContentData */ #include "scriptPCH.h" -/*###### -## npc_kalaran_windblade -######*/ - -bool GossipHello_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - - if (pPlayer->GetQuestStatus(3441) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me what drives this vengance?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - - return true; -} - -bool GossipSelect_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch (uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(1954, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let me confer with my colleagues", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1955, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(3441); - break; - } - return true; -} - /*###### ## npc_lothos_riftwaker ######*/ @@ -99,42 +61,6 @@ bool GossipSelect_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature, uin return true; } -/*###### -## npc_zamael_lunthistle -######*/ - -bool GossipHello_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - - if (pPlayer->GetQuestStatus(3377) == QUEST_STATUS_INCOMPLETE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - pPlayer->SEND_GOSSIP_MENU(1920, pCreature->GetGUID()); - - return true; -} - -bool GossipSelect_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch (uiAction) - { - case GOSSIP_ACTION_INFO_DEF: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(1921, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Goodbye", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(1922, pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->AreaExploredOrEventHappens(3377); - break; - } - return true; -} /*###### ## npc_dorius_stonetender ######*/ @@ -451,24 +377,12 @@ void AddSC_searing_gorge() { Script *newscript; - newscript = new Script; - newscript->Name = "npc_kalaran_windblade"; - newscript->pGossipHello = &GossipHello_npc_kalaran_windblade; - newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_lothos_riftwaker"; newscript->pGossipHello = &GossipHello_npc_lothos_riftwaker; newscript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_zamael_lunthistle"; - newscript->pGossipHello = &GossipHello_npc_zamael_lunthistle; - newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_dorius_stonetender"; newscript->GetAI = &GetAI_npc_dorius_stonetender;