diff options
author | offl <offl@users.noreply.github.com> | 2020-06-29 01:24:45 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-19 23:01:12 +0100 |
commit | fa0d4ceea10c40594617199728ed54dcd5a88e7e (patch) | |
tree | adb74db971a25b40c5dd865ababac0d6a6bc8f7d /src | |
parent | 6b058adfb32042294d28ec3d84573102f892d6e4 (diff) |
DB/Quest: Convert & update support for 'Escorting Erland' to SAI
Closes #24834
(cherry picked from commit eea3cf14017065dbf11deb0aa12f4cd7dd06abd6)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp deleted file mode 100644 index 9cc5a1e0511..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ /dev/null @@ -1,138 +0,0 @@ - /* - * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information - * - * 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: Silverpine_Forest -SD%Complete: 100 -SDComment: Quest support: 435 -SDCategory: Silverpine Forest -EndScriptData */ - -/* ContentData -npc_deathstalker_erland -EndContentData */ - -#include "ScriptMgr.h" -#include "Player.h" -#include "ScriptedEscortAI.h" - -/*###### -## npc_deathstalker_erland -######*/ - -enum eErland -{ - SAY_QUESTACCEPT = 0, - SAY_START = 1, - SAY_AGGRO = 2, - SAY_PROGRESS = 3, - SAY_LAST = 4, - - SAY_RANE = 0, - SAY_RANE_ANSWER = 5, - SAY_MOVE_QUINN = 6, - - SAY_QUINN = 7, - SAY_QUINN_ANSWER = 0, - SAY_BYE = 8, - - QUEST_ESCORTING = 435, - NPC_RANE = 1950, - NPC_QUINN = 1951 -}; - -class npc_deathstalker_erland : public CreatureScript -{ -public: - npc_deathstalker_erland() : CreatureScript("npc_deathstalker_erland") { } - - struct npc_deathstalker_erlandAI : public EscortAI - { - npc_deathstalker_erlandAI(Creature* creature) : EscortAI(creature) { } - - void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override - { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) - { - case 1: - Talk(SAY_START, player); - break; - case 10: - Talk(SAY_PROGRESS); - break; - case 13: - Talk(SAY_LAST, player); - player->GroupEventHappens(QUEST_ESCORTING, me); - break; - case 15: - if (Creature* rane = me->FindNearestCreature(NPC_RANE, 20.0f)) - rane->AI()->Talk(SAY_RANE); - break; - case 16: - Talk(SAY_RANE_ANSWER); - break; - case 17: - Talk(SAY_MOVE_QUINN); - break; - case 24: - Talk(SAY_QUINN); - break; - case 25: - if (Creature* quinn = me->FindNearestCreature(NPC_QUINN, 20.0f)) - quinn->AI()->Talk(SAY_QUINN_ANSWER); - break; - case 26: - Talk(SAY_BYE); - break; - } - } - - void Reset() override { } - - void JustEngagedWith(Unit* who) override - { - Talk(SAY_AGGRO, who); - } - - void QuestAccept(Player* player, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_ESCORTING) - { - Talk(SAY_QUESTACCEPT, player); - Start(true, false, player->GetGUID()); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_deathstalker_erlandAI(creature); - } -}; - -/*###### -## AddSC -######*/ - -void AddSC_silverpine_forest() -{ - new npc_deathstalker_erland(); -} |