diff options
-rw-r--r-- | sql/updates/world/3.3.5/9999_99_99_99_world.sql | 18 | ||||
-rw-r--r-- | src/server/scripts/Outland/zone_zangarmarsh.cpp | 72 |
2 files changed, 19 insertions, 71 deletions
diff --git a/sql/updates/world/3.3.5/9999_99_99_99_world.sql b/sql/updates/world/3.3.5/9999_99_99_99_world.sql new file mode 100644 index 00000000000..cc28650c6fa --- /dev/null +++ b/sql/updates/world/3.3.5/9999_99_99_99_world.sql @@ -0,0 +1,18 @@ +-- +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (7582,7583,7585); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(7582,0,0,'Greetings, elder. It is time for your people to end their hostility toward the draenei and their allies.',14872,1,3,7583,0,0,0,'',0,-1), +(7583,0,0,'I did not mean to deceive you, elder. The draenei of Telredor thought to approach you in a way that would be familiar to you.',14874,1,3,7585,0,0,0,'',0,-1), +(7585,0,0,'I will tell them. Farewell, elder.',14879,1,3,7586,0,0,0,'',0,-1); + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 18197; + +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 18197); +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 +(18197, 0, 0, 0, 62, 0, 100, 0, 7585, 0, 0, 0, 11, 32152, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elder Kuruti - On Gossip Option 0 Selected - Add \'Elder Kuruti\'s Response\''); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7582; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,7582,0,0,1,8,0,9803,0,0,1,0,'','Elder Kuruti - Show Gossip Option 0 if Quest 9803 is not rewarded'), +(15,7582,0,0,1,9,0,9803,0,0,0,0,'','Elder Kuruti - Show Gossip Option 0 if Quest 9803 is taken'), +(15,7582,0,0,1,2,0,24573,1,0,1,0,'','Elder Kuruti - Show Gossip Option 0 if player does not have item 24573 in inventory'); diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp index f111d92df4b..916e6167d13 100644 --- a/src/server/scripts/Outland/zone_zangarmarsh.cpp +++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp @@ -19,14 +19,13 @@ /* ScriptData SDName: Zangarmarsh SD%Complete: 100 -SDComment: Quest support: 9752, 9785, 9803, 10009. Mark Of ... buffs. +SDComment: Quest support: 9752, 9785, 10009. Mark Of ... buffs. SDCategory: Zangarmarsh EndScriptData */ /* ContentData npcs_ashyen_and_keleth npc_cooshcoosh -npc_elder_kuruti npc_kayra_longmane EndContentData */ @@ -242,74 +241,6 @@ public: }; /*###### -## npc_elder_kuruti -######*/ - -#define GOSSIP_ITEM_KUR1 "Greetings, elder. It is time for your people to end their hostility towards the draenei and their allies." -#define GOSSIP_ITEM_KUR2 "I did not mean to deceive you, elder. The draenei of Telredor thought to approach you in a way that would seem familiar to you." -#define GOSSIP_ITEM_KUR3 "I will tell them. Farewell, elder." - -class npc_elder_kuruti : public CreatureScript -{ -public: - npc_elder_kuruti() : CreatureScript("npc_elder_kuruti") { } - - struct npc_elder_kurutiAI : public ScriptedAI - { - npc_elder_kurutiAI(Creature* creature) : ScriptedAI(creature) { } - - bool GossipHello(Player* player) override - { - if (player->GetQuestStatus(9803) == QUEST_STATUS_INCOMPLETE) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - SendGossipMenuFor(player, 9226, me->GetGUID()); - return true; - } - - bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override - { - uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId); - ClearGossipMenuFor(player); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, 9227, me->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - SendGossipMenuFor(player, 9229, me->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - { - if (!player->HasItemCount(24573)) - { - ItemPosCountVec dest; - uint32 itemId = 24573; - InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1, nullptr); - if (msg == EQUIP_ERR_OK) - { - player->StoreNewItem(dest, itemId, true); - } - else - player->SendEquipError(msg, nullptr, nullptr, itemId); - } - SendGossipMenuFor(player, 9231, me->GetGUID()); - break; - } - } - return true; - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_elder_kurutiAI(creature); - } -}; - -/*###### ## npc_kayra_longmane ######*/ @@ -392,6 +323,5 @@ void AddSC_zangarmarsh() { new npcs_ashyen_and_keleth(); new npc_cooshcoosh(); - new npc_elder_kuruti(); new npc_kayra_longmane(); } |