diff options
author | offl <offl@users.noreply.github.com> | 2020-06-29 01:24:45 +0200 |
---|---|---|
committer | Killyana <morphone1@gmail.com> | 2020-06-29 01:24:45 +0200 |
commit | eea3cf14017065dbf11deb0aa12f4cd7dd06abd6 (patch) | |
tree | bf8cac86a5b8a0dc480a4309f0da01643b31c9e7 /src | |
parent | fb58ca0bf5a8dc0c6e0ffbbf1e3462bb731fc097 (diff) |
DB/Quest: Convert & update support for 'Escorting Erland' to SAI
Closes #24834
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp | 141 |
1 files changed, 0 insertions, 141 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 f506318b11a..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ /dev/null @@ -1,141 +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 "CreatureAIImpl.h" -#include "ScriptedEscortAI.h" -#include "ObjectAccessor.h" -#include "Player.h" -#include "TemporarySummon.h" - -/*###### -## npc_deathstalker_erland -######*/ - -enum Erland -{ - 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(); -} |