mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
DB/Quest: Convert & update support for 'All Along the Watchtowers' to SAI
Closes #24732
This commit is contained in:
@@ -188,7 +188,7 @@ void AddSC_stormwind_city();
|
||||
void AddSC_swamp_of_sorrows();
|
||||
void AddSC_tirisfal_glades();
|
||||
void AddSC_undercity();
|
||||
void AddSC_western_plaguelands();
|
||||
//void AddSC_western_plaguelands();
|
||||
|
||||
// The name of this function should match:
|
||||
// void Add${NameOfDirectory}Scripts()
|
||||
@@ -366,5 +366,5 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_swamp_of_sorrows();
|
||||
AddSC_tirisfal_glades();
|
||||
AddSC_undercity();
|
||||
AddSC_western_plaguelands();
|
||||
//AddSC_western_plaguelands();
|
||||
}
|
||||
|
||||
@@ -1,76 +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: Western_Plaguelands
|
||||
SD%Complete: 90
|
||||
SDComment: Quest support: 5097, 5098, 5216, 5219, 5222, 5225, 5229, 5231, 5233, 5235.
|
||||
SDCategory: Western Plaguelands
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_andorhal_tower
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Player.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
/*######
|
||||
## npcs_andorhal_tower
|
||||
######*/
|
||||
|
||||
enum AndorhalTower
|
||||
{
|
||||
GO_BEACON_TORCH = 176093
|
||||
};
|
||||
|
||||
class npc_andorhal_tower : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_andorhal_tower() : CreatureScript("npc_andorhal_tower") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_andorhal_towerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_andorhal_towerAI : public ScriptedAI
|
||||
{
|
||||
npc_andorhal_towerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!who || who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (me->FindNearestGameObject(GO_BEACON_TORCH, 10.0f))
|
||||
if (Player* player = who->ToPlayer())
|
||||
player->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_western_plaguelands()
|
||||
{
|
||||
new npc_andorhal_tower();
|
||||
}
|
||||
Reference in New Issue
Block a user