diff options
-rw-r--r-- | sql/updates/world/3.3.5/2016_10_32_17813_world.sql | 34 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp | 62 |
2 files changed, 34 insertions, 62 deletions
diff --git a/sql/updates/world/3.3.5/2016_10_32_17813_world.sql b/sql/updates/world/3.3.5/2016_10_32_17813_world.sql new file mode 100644 index 00000000000..376e19e19a1 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_10_32_17813_world.sql @@ -0,0 +1,34 @@ +SET @Saat := 20201; +SET @Menu := 8088; + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName`= '' WHERE `entry` = @Saat; + +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = @Saat); +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 +(@Saat,0, 0,1, 62, 0,100,0,@Menu, 0, 0, 0, 72, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 0 selected - Close gossip"), +(@Saat,0, 1,0, 61, 0,100,0, 0, 0, 0, 0, 11,34975, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 0 selected - Cast 'Conjure Chrono-Beacon'"), +(@Saat,0, 2,3, 62, 0,100,0,@Menu, 1, 0, 0, 72, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 1 selected - Close gossip"), +(@Saat,0, 3,0, 61, 0,100,0, 0, 0, 0, 0, 11,34975, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 1 selected - Cast 'Conjure Chrono-Beacon'"), +(@Saat,0, 4,0, 10, 0,100,1, 1,16,1000,1000, 1, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - Out Of Combat, in Line Of Sight - Say text 1"); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`= @Menu AND `id`= 1; +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`,`VerifiedBuild`) VALUES +(@Menu, 1, 0, "I require a chrono-beacon, Sa'at.", 17881, 1, 1, 0, 0, 0, 0, '', 0, 0); + +DELETE FROM `gossip_menu` WHERE `entry`= @Menu AND `text_id` IN (10000,10001,10002); +INSERT INTO `gossip_menu` (`entry`,`text_id`,`VerifiedBuild`) VALUES +(@Menu, 10000, 0), +(@Menu, 10001, 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`= @Menu; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14, @Menu, 10001, 0, 0, 8, 0, 10297, 0, 0, 0, 0, 0, '', 'Show gossip menu 8088 text id 10001 if quest The Opening of the Dark Portal has been rewarded.'), +(14, @Menu, 10000, 0, 0, 8, 0, 10297, 0, 0, 1, 0, 0, '', 'Show gossip menu 8088 text id 10000 if quest The Opening of the Dark Portal is not rewarded.'), +(15, @Menu, 1, 0, 2, 8, 0, 10297, 0, 0, 0, 0, 0, '', 'Show gossip menu 8088 option id 1 if quest The Opening of the Dark Portal has been rewarded'), +(15, @Menu, 1, 0, 2, 2, 0, 24289, 1, 0, 1, 0, 0, '', 'Show gossip menu 8088 option id 1 if player has 0 of Chrono-Beacon. Item cannot be in bank. -AND 2-'), +(15, @Menu, 0, 0, 3, 9, 0, 10297, 0, 0, 0, 0, 0, '', 'Show gossip menu 8088 option id 0 if quest The Opening of the Dark Portal has not been taken. -AND 3-'), +(15, @Menu, 0, 0, 3, 2, 0, 24289, 1, 0, 1, 0, 0, '', 'Show gossip menu 8088 option id 0 if player has 0 of Chrono-Beacon. Item cannot be in bank. -AND 3-'); + +DELETE FROM `creature_text` WHERE `entry`= @Saat; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@Saat, 0,0,'Stop! Do not go any further, mortal. You are ill-prepared to face the forces of the Infinite Dragonflight. Come, let me help you.', 12,0,100,1,0,0,17814,0, 'Saat'); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp index 137da1002af..34a456ae502 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp @@ -16,19 +16,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* -Name: The_Black_Morass -%Complete: 30 -Comment: Misc NPC's and mobs for instance. Most here far from complete. -Category: Caverns of Time, The Black Morass -*/ - -/* ContentData -npc_medivh_bm -npc_time_rift -npc_saat -EndContentData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" @@ -365,57 +352,8 @@ public: }; -enum Saat -{ - SPELL_CHRONO_BEACON = 34975, - ITEM_CHRONO_BEACON = 24289 -}; - -#define GOSSIP_ITEM_OBTAIN "[PH] Obtain Chrono-Beacon" - -class npc_saat : public CreatureScript -{ -public: - npc_saat() : CreatureScript("npc_saat") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - CloseGossipMenuFor(player); - creature->CastSpell(player, SPELL_CHRONO_BEACON, false); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(ITEM_CHRONO_BEACON)) - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_OBTAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - SendGossipMenuFor(player, 10000, creature->GetGUID()); - return true; - } - else if (player->GetQuestRewardStatus(QUEST_OPENING_PORTAL) && !player->HasItemCount(ITEM_CHRONO_BEACON)) - { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_OBTAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - SendGossipMenuFor(player, 10001, creature->GetGUID()); - return true; - } - - SendGossipMenuFor(player, 10002, creature->GetGUID()); - return true; - } - -}; - void AddSC_the_black_morass() { new npc_medivh_bm(); new npc_time_rift(); - new npc_saat(); } |