mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
DB/Quest: Convert & update support for 'All Along the Watchtowers' to SAI
Closes #24732
(cherry picked from commit 8bccb258ba)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
--
|
||||
UPDATE `gameobject_template` SET `AIName` = "SmartGameObjectAI" WHERE `entry` = 176093;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 176093 AND `source_type` = 1;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(176093,1,0,1,1,0,100,1,0,0,0,0,0,64,1,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Beacon Torch - On Update - Store Targetlist"),
|
||||
(176093,1,1,2,61,0,100,0,0,0,0,0,0,100,1,0,0,0,0,0,19,10902,30,0,0,0,0,0,0,"Beacon Torch - On Link - Send Target 1 (Andorhal Tower One)"),
|
||||
(176093,1,2,3,61,0,100,0,0,0,0,0,0,100,1,0,0,0,0,0,19,10903,30,0,0,0,0,0,0,"Beacon Torch - On Link - Send Target 1 (Andorhal Tower Two)"),
|
||||
(176093,1,3,4,61,0,100,0,0,0,0,0,0,100,1,0,0,0,0,0,19,10904,30,0,0,0,0,0,0,"Beacon Torch - On Link - Send Target 1 (Andorhal Tower Three)"),
|
||||
(176093,1,4,5,61,0,100,0,0,0,0,0,0,100,1,0,0,0,0,0,19,10905,30,0,0,0,0,0,0,"Beacon Torch - On Link - Send Target 1 (Andorhal Tower Four)"),
|
||||
(176093,1,5,6,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,19,10902,30,0,0,0,0,0,0,"Beacon Torch - On Link - Set Data 0 1 (Andorhal Tower One)"),
|
||||
(176093,1,6,7,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,19,10903,30,0,0,0,0,0,0,"Beacon Torch - On Link - Set Data 0 1 (Andorhal Tower Two)"),
|
||||
(176093,1,7,8,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,19,10904,30,0,0,0,0,0,0,"Beacon Torch - On Link - Set Data 0 1 (Andorhal Tower Three)"),
|
||||
(176093,1,8,0,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,19,10905,30,0,0,0,0,0,0,"Beacon Torch - On Link - Set Data 0 1 (Andorhal Tower Four)");
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = "SmartAI", `ScriptName` = "" WHERE `entry` IN (10902,10903,10904,10905);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (10902,10903,10904,10905) AND `source_type` = 0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(10902,0,0,0,38,0,100,0,0,1,0,0,0,33,10902,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Andorhal Tower One - On Data Set 0 1 - Quest Credit 'All Along the Watchtowers'"),
|
||||
(10903,0,0,0,38,0,100,0,0,1,0,0,0,33,10903,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Andorhal Tower Two - On Data Set 0 1 - Quest Credit 'All Along the Watchtowers'"),
|
||||
(10904,0,0,0,38,0,100,0,0,1,0,0,0,33,10904,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Andorhal Tower Three - On Data Set 0 1 - Quest Credit 'All Along the Watchtowers'"),
|
||||
(10905,0,0,0,38,0,100,0,0,1,0,0,0,33,10905,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Andorhal Tower Four - On Data Set 0 1 - Quest Credit 'All Along the Watchtowers'");
|
||||
@@ -201,7 +201,7 @@ void AddSC_swamp_of_sorrows();
|
||||
void AddSC_tirisfal_glades();
|
||||
void AddSC_tol_barad();
|
||||
void AddSC_undercity();
|
||||
void AddSC_western_plaguelands();
|
||||
//void AddSC_western_plaguelands();
|
||||
|
||||
// The name of this function should match:
|
||||
// void Add${NameOfDirectory}Scripts()
|
||||
@@ -393,5 +393,5 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_tirisfal_glades();
|
||||
AddSC_tol_barad();
|
||||
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