diff options
Diffstat (limited to 'src/server/scripts')
4 files changed, 5 insertions, 127 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index c65ee5482e3..81044a0dbb1 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -449,8 +449,6 @@ class npc_eye_of_acherus : public CreatureScript ## npc_death_knight_initiate ######*/ -#define GOSSIP_ACCEPT_DUEL "I challenge you, death knight!" - enum Spells_DKI { SPELL_DUEL = 52996, @@ -511,7 +509,7 @@ public: if (player->IsInCombat() || creature->IsInCombat()) return true; - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(Player::GetDefaultGossipMenuForSource(creature), 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); } return true; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 47a6c0b6a21..94cf2825e60 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -63,8 +63,6 @@ enum Creatures NPC_ASH = 3850 }; -#define GOSSIP_ITEM_DOOR "Thanks, I'll follow you to the door." - class npc_shadowfang_prisoner : public CreatureScript { public: @@ -93,7 +91,7 @@ public: InstanceScript* instance = creature->GetInstanceScript(); if (instance && instance->GetData(TYPE_FREE_NPC) != DONE && instance->GetData(TYPE_RETHILGORE) == DONE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM_DB(Player::GetDefaultGossipMenuForSource(creature), 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index 4ab9d872887..6cf86c3069f 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -114,13 +114,12 @@ public: enum Myranda { + ILLUSION_GOSSIP = 4773, QUEST_SUBTERFUGE = 5862, QUEST_IN_DREAMS = 5944, SPELL_SCARLET_ILLUSION = 17961 }; -#define GOSSIP_ITEM_ILLUSION "I am ready for the illusion, Myranda." - class npc_myranda_the_hag : public CreatureScript { public: @@ -146,8 +145,8 @@ public: player->GetQuestStatus(QUEST_IN_DREAMS) != QUEST_STATUS_COMPLETE && !player->HasAura(SPELL_SCARLET_ILLUSION)) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ILLUSION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(4773, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(Player::GetDefaultGossipMenuForSource(creature), 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->SEND_GOSSIP_MENU(ILLUSION_GOSSIP, creature->GetGUID()); return true; } else diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp deleted file mode 100644 index a200ba545d8..00000000000 --- a/src/server/scripts/World/npc_taxi.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/* ScriptData -SDName: Npc_Taxi -SD%Complete: 0% -SDComment: To be used for taxi NPCs that are located globally. -SDCategory: NPCs -EndScriptData -*/ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "Player.h" -#include "WorldSession.h" - -#define GOSSIP_SUSURRUS "I am ready." -#define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!" -#define GOSSIP_BRAZEN "I am ready to go to Durnholde Keep." -#define GOSSIP_VERONIA "Fly me to Manaforge Coruu please" -#define GOSSIP_CRIMSONWING "<Ride the gryphons to Survey Alcaz Island>" - -class npc_taxi : public CreatureScript -{ -public: - npc_taxi() : CreatureScript("npc_taxi") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - switch (creature->GetEntry()) - { - case 17435: // Azuremyst Isle - Susurrus - if (player->HasItemCount(23843, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SUSURRUS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - break; - case 20903: // Netherstorm - Protectorate Nether Drake - if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NETHER_DRAKE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - break; - case 18725: // Old Hillsbrad Foothills - Brazen - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BRAZEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - break; - case 20162: // Netherstorm - Veronia - //Behind Enemy Lines - if (player->GetQuestStatus(10652) != QUEST_STATUS_REWARDED) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VERONIA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); - break; - case 23704: // Dustwallow Marsh - Cassa Crimsonwing - if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25); - break; - } - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF: - //spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506. - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, 32474, true); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - player->CLOSE_GOSSIP_MENU(); - player->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155)) - break; - case GOSSIP_ACTION_INFO_DEF + 2: - if (!player->HasItemCount(25853)) - player->SEND_GOSSIP_MENU(9780, creature->GetGUID()); - else - { - player->CLOSE_GOSSIP_MENU(); - player->ActivateTaxiPathTo(534); //TaxiPath 534 - } - break; - case GOSSIP_ACTION_INFO_DEF + 15: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, 34905, true); //TaxiPath 606 - break; - case GOSSIP_ACTION_INFO_DEF + 25: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, 42295, true); - break; - } - - return true; - } -}; - -void AddSC_npc_taxi() -{ - new npc_taxi; -} |
