diff options
| author | Andrew Letson <velinath@users.noreply.github.com> | 2017-10-13 13:12:59 -0400 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2020-12-31 23:23:50 +0100 |
| commit | 011d4d0b97f263a3415f992d566e1a9024ce2649 (patch) | |
| tree | 0dbd60c91dbb079451a7572f27ce02e6bed12032 | |
| parent | 37ce552416d03c3c0f74b7a0ee59871c3045895e (diff) | |
Scripts/Outland: migrate Elder Kuruti to SAI
* Migrate Elder Kuruti to SAI
(cherry picked from commit ac63614016291c11a278c890ee79743b173106a3)
| -rw-r--r-- | sql/updates/world/master/2020_11_08_02_world_9999_99_99_99_world.sql | 22 | ||||
| -rw-r--r-- | src/server/scripts/Outland/zone_zangarmarsh.cpp | 72 |
2 files changed, 23 insertions, 71 deletions
diff --git a/sql/updates/world/master/2020_11_08_02_world_9999_99_99_99_world.sql b/sql/updates/world/master/2020_11_08_02_world_9999_99_99_99_world.sql new file mode 100644 index 00000000000..f186c9dd6a7 --- /dev/null +++ b/sql/updates/world/master/2020_11_08_02_world_9999_99_99_99_world.sql @@ -0,0 +1,22 @@ +-- +-- 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 existing entries +UPDATE `gossip_menu_option` SET `OptionType`=1, `OptionNpcFlag`=3 WHERE `MenuId`=7582 AND `OptionIndex`=0; +UPDATE `gossip_menu_option` SET `OptionType`=1, `OptionNpcFlag`=3 WHERE `MenuId`=7583 AND `OptionIndex`=0; +UPDATE `gossip_menu_option` SET `OptionType`=1, `OptionNpcFlag`=3 WHERE `MenuId`=7585 AND `OptionIndex`=0; + +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 2ad72409d13..a8e0ff68859 100644 --- a/src/server/scripts/Outland/zone_zangarmarsh.cpp +++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp @@ -18,14 +18,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 */ @@ -239,74 +238,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 ######*/ @@ -389,6 +320,5 @@ void AddSC_zangarmarsh() { new npcs_ashyen_and_keleth(); new npc_cooshcoosh(); - new npc_elder_kuruti(); new npc_kayra_longmane(); } |
