diff options
author | offl <offl@users.noreply.github.com> | 2020-06-14 18:26:35 +0200 |
---|---|---|
committer | Killyana <morphone1@gmail.com> | 2020-06-14 18:26:35 +0200 |
commit | 8bccb258ba027c013ee4e6e5d59f184129d27d5c (patch) | |
tree | ed5ff7f098785caf8e6910b2a4f9afb588771281 | |
parent | d70eb96c85ab6b117e785261932ca7c454a5fad2 (diff) |
DB/Quest: Convert & update support for 'All Along the Watchtowers' to SAI
Closes #24732
3 files changed, 23 insertions, 78 deletions
diff --git a/sql/updates/world/3.3.5/2020_06_14_05_world.sql b/sql/updates/world/3.3.5/2020_06_14_05_world.sql new file mode 100644 index 00000000000..57986eec9a5 --- /dev/null +++ b/sql/updates/world/3.3.5/2020_06_14_05_world.sql @@ -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'"); diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index 27b7ec7e428..c1c916e07d5 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -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(); } diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp deleted file mode 100644 index 686eba55373..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ /dev/null @@ -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(); -} |