From 7a101bcf00af2cb3b5af5926faea5533dc64099a Mon Sep 17 00:00:00 2001 From: tkrokli Date: Sun, 24 Jan 2016 19:05:49 +0100 Subject: [3.3.5] Core/Scripts/DB: move core script 'npc_parqual_fintallas' to SAI Additional change: menu options are changed from containing only names to include the text " is my answer.", based on the lines in `broadcast_text`. - replaced core text with DB SAI script - created DB creature_text entries for Parqual Fintallas - created DB gossip_menu_option entries for the NPC - implemented NPC say lines in reply to all the answers - added conditions for which gossip should show, depending on quest status - added conditions to avoid exploits in the time it takes for NPC to say his texts This PR is tested several times on a horde character (horde-only quest). It now works as originally intended, with option-specific NPC replies. --- .../scripts/EasternKingdoms/zone_undercity.cpp | 54 ---------------------- 1 file changed, 54 deletions(-) (limited to 'src/server') diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index 43143748661..c0b4e06cfff 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -316,59 +316,6 @@ public: }; }; -/*###### -## npc_parqual_fintallas -######*/ - -enum ParqualFintallas -{ - SPELL_MARK_OF_SHAME = 6767 -}; - -#define GOSSIP_HPF1 "Gul'dan" -#define GOSSIP_HPF2 "Kel'Thuzad" -#define GOSSIP_HPF3 "Ner'zhul" - -class npc_parqual_fintallas : public CreatureScript -{ -public: - npc_parqual_fintallas() : CreatureScript("npc_parqual_fintallas") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->CLOSE_GOSSIP_MENU(); - creature->CastSpell(player, SPELL_MARK_OF_SHAME, false); - } - if (action == GOSSIP_ACTION_INFO_DEF+2) - { - player->CLOSE_GOSSIP_MENU(); - player->AreaExploredOrEventHappens(6628); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !player->HasAura(SPELL_MARK_OF_SHAME)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HPF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HPF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HPF3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->SEND_GOSSIP_MENU(5822, creature->GetGUID()); - } - else - player->SEND_GOSSIP_MENU(5821, creature->GetGUID()); - - return true; - } -}; - /*###### ## AddSC ######*/ @@ -377,5 +324,4 @@ void AddSC_undercity() { new npc_lady_sylvanas_windrunner(); new npc_highborne_lamenter(); - new npc_parqual_fintallas(); } -- cgit v1.2.3