diff options
author | offl <offl@users.noreply.github.com> | 2020-07-06 23:34:41 +0200 |
---|---|---|
committer | Killyana <Killyana@users.noreply.github.com> | 2020-07-06 23:34:41 +0200 |
commit | c29e3b46af49e3baeb3da01f839aa9eb1a44bb7b (patch) | |
tree | 6f66c1b0f6618695dcae465da1121be8f782b58a /src | |
parent | 7b010ca65bd8d9e023a1402862327e4937491a1f (diff) |
DB/Quest: Convert & update support for 'Protect Kaya' to SAI
Closes #24923
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Kalimdor/kalimdor_script_loader.cpp | 4 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp | 106 |
2 files changed, 2 insertions, 108 deletions
diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index eeed526e084..897c46cc1d4 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -117,7 +117,7 @@ void AddSC_feralas(); void AddSC_moonglade(); void AddSC_orgrimmar(); void AddSC_silithus(); -void AddSC_stonetalon_mountains(); +// void AddSC_stonetalon_mountains(); void AddSC_tanaris(); void AddSC_the_barrens(); void AddSC_thousand_needles(); @@ -230,7 +230,7 @@ void AddKalimdorScripts() AddSC_moonglade(); AddSC_orgrimmar(); AddSC_silithus(); - AddSC_stonetalon_mountains(); + // AddSC_stonetalon_mountains(); AddSC_tanaris(); AddSC_the_barrens(); AddSC_thousand_needles(); diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp deleted file mode 100644 index 7f6fbd978fd..00000000000 --- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp +++ /dev/null @@ -1,106 +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/>. - */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "ScriptedEscortAI.h" -#include "Player.h" - -/*###### -## npc_kaya_flathoof -######*/ - -enum Kaya -{ - NPC_GRIMTOTEM_RUFFIAN = 11910, - NPC_GRIMTOTEM_BRUTE = 11912, - NPC_GRIMTOTEM_SORCERER = 11913, - - SAY_START = 0, - SAY_AMBUSH = 1, - SAY_END = 2, - - QUEST_PROTECT_KAYA = 6523 -}; - -class npc_kaya_flathoof : public CreatureScript -{ -public: - npc_kaya_flathoof() : CreatureScript("npc_kaya_flathoof") { } - - struct npc_kaya_flathoofAI : public EscortAI - { - npc_kaya_flathoofAI(Creature* creature) : EscortAI(creature) { } - - void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override - { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - switch (waypointId) - { - case 16: - Talk(SAY_AMBUSH); - me->SummonCreature(NPC_GRIMTOTEM_BRUTE, -48.53f, -503.34f, -46.31f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85f, -503.77f, -45.90f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37f, -496.23f, -45.71f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 18: - me->SetFacingToObject(player); - Talk(SAY_END); - player->GroupEventHappens(QUEST_PROTECT_KAYA, me); - break; - } - } - - void JustSummoned(Creature* summoned) override - { - summoned->AI()->AttackStart(me); - } - - void Reset() override { } - - void QuestAccept(Player* player, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_PROTECT_KAYA) - { - Start(true, false, player->GetGUID()); - - Talk(SAY_START); - me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE); - me->SetImmuneToPC(false); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_kaya_flathoofAI(creature); - } - -}; - -/*###### -## AddSC -######*/ - -void AddSC_stonetalon_mountains() -{ - new npc_kaya_flathoof(); -} |