diff options
author | Malcrom <malcromdev@gmail.com> | 2013-07-15 13:51:51 -0230 |
---|---|---|
committer | Malcrom <malcromdev@gmail.com> | 2013-07-15 13:51:51 -0230 |
commit | 9e91219cd3b7b9bd02d75a247053abd90d17de11 (patch) | |
tree | d56268f665e9387ddedbcd48db61408101743b91 | |
parent | 779a59e7e218e340ac5cefd3297ea970d804239d (diff) |
DB/Gossip: Add missing gossip for Sputtervalve. Moved all scripting to SAI.
-rw-r--r-- | sql/updates/world/2013_07_15_00_world_gossip.sql | 25 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/zone_the_barrens.cpp | 37 |
2 files changed, 25 insertions, 37 deletions
diff --git a/sql/updates/world/2013_07_15_00_world_gossip.sql b/sql/updates/world/2013_07_15_00_world_gossip.sql new file mode 100644 index 00000000000..33467ad43be --- /dev/null +++ b/sql/updates/world/2013_07_15_00_world_gossip.sql @@ -0,0 +1,25 @@ +-- Add SAI for Sputtervalve <Independent Contractor> Quest 6981 +UPDATE `creature_template` SET `gossip_menu_id`=21,`ScriptName`='' WHERE `entry`=3442; +DELETE FROM `smart_scripts` WHERE `entryorguid`=3442 AND `source_type`=0 AND `id`=1; +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 +(3442, 0, 1, 0, 62, 0, 100, 0, 21, 1, 0, 0, 15, 6981, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Sputtervalve - Gossip Option 1 - Complete quest 6981'); +-- Gossip Menu +DELETE FROM `gossip_menu` WHERE `entry`=21199; +DELETE FROM `gossip_menu` WHERE `entry` IN (21,22,21340); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +('21','518'), ('21','519'), ('22','520'), (21340,2013); +-- Gossip Options +DELETE FROM `gossip_menu_option` WHERE `menu_id`=21; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES +(21,0,0, 'How can I help?',1,1,22), +(21,1,0, 'Can you tell me about this shard?',1,1,21340); +-- Gossip Menu Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=21; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,21,518,0,0,27,0,10,3,0,0,'','Gossip text requires level 10 or higher'), +(15,21,519,0,0,27,0,10,2,0,0,'','Gossip text requires lower than level 10'); +-- Gossip Options Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,21,0,0,0,27,0,10,3,0,0,'','Gossip Option requires level 10 or higher'), +(15,21,1,0,0,9,0,6981,0,0,0,'','Gossip Option requires quest not complete'); 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 @@ -176,42 +176,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(); |