diff options
-rw-r--r-- | sql/updates/world/master/2017_01_29_05_world_2016_06_14_05_world.sql | 18 | ||||
-rw-r--r-- | src/server/scripts/Outland/zone_netherstorm.cpp | 53 |
2 files changed, 19 insertions, 52 deletions
diff --git a/sql/updates/world/master/2017_01_29_05_world_2016_06_14_05_world.sql b/sql/updates/world/master/2017_01_29_05_world_2016_06_14_05_world.sql new file mode 100644 index 00000000000..2b34562e4bb --- /dev/null +++ b/sql/updates/world/master/2017_01_29_05_world_2016_06_14_05_world.sql @@ -0,0 +1,18 @@ +-- Add sniffed gossip text to menu +DELETE FROM `gossip_menu_option` WHERE `menu_id` = 8207; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(8207, 0, 0, 'I need a new phase disruptor, Professor.', 18635,1,1,0,0,0,0,'',0); + +-- Migrate NPC to use SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 20907; + +-- Create SmartAI for Dabiri +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 20907); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(20907,0, 0, 1, 62, 0, 100, 0, 8207, 0,0,0, 85, 35780, 0,0,0,0,0, 7, 0,0,0,0,0,0,0, "Professor Dabiri - On Gossip Option 0 Selected - Invoker Cast 'Summon Phase Disruptor'"), +(20907,0, 1, 0, 61, 0, 100, 0, 0, 0,0,0, 72, 0, 0,0,0,0,0, 7, 0,0,0,0,0,0,0, 'Professor Dabiri - On Linked Actions - Close Gossip'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 8207; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,8207,0,0,0,2,0,29778,1,0,1,0,'','Professor Dabiri - Show gossip option 0 if player does not have item 29778 in inventory'), +(15,8207,0,0,0,9,0,10438,0,0,0,0,'','Professor Dabiri - Show gossip option 0 if player has accepted quest 10438'); diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index a325c9f5970..0d463c82dfd 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -19,7 +19,7 @@ /* ScriptData SDName: Netherstorm SD%Complete: 80 -SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10198, 10191 +SDComment: Quest support: 10337, 10652 (special flight paths), 10198, 10191 SDCategory: Netherstorm EndScriptData */ @@ -335,56 +335,6 @@ public: }; /*###### -## npc_professor_dabiri -######*/ -enum ProfessorDabiriData -{ - SPELL_PHASE_DISTRUPTOR = 35780, - - //WHISPER_DABIRI = 0, not existing in database - - QUEST_DIMENSIUS = 10439, - QUEST_ON_NETHERY_WINGS = 10438, -}; - -#define GOSSIP_ITEM "I need a new phase distruptor, Professor" - -class npc_professor_dabiri : public CreatureScript -{ -public: - npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { } - - //OnQuestAccept: - //if (quest->GetQuestId() == QUEST_DIMENSIUS) - //creature->AI()->Talk(WHISPER_DABIRI, player); - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false); - player->CLOSE_GOSSIP_MENU(); - } - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - -/*###### ## npc_phase_hunter ######*/ @@ -752,7 +702,6 @@ void AddSC_netherstorm() { new npc_commander_dawnforge(); new at_commander_dawnforge(); - new npc_professor_dabiri(); new npc_phase_hunter(); new npc_bessy(); new npc_maxx_a_million_escort(); |