diff --git a/sql/migrations/20181214003834_world.sql b/sql/migrations/20181214003834_world.sql new file mode 100644 index 000000000..28786e748 --- /dev/null +++ b/sql/migrations/20181214003834_world.sql @@ -0,0 +1,30 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20181214003834'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20181214003834'); +-- Add your query below. + + +-- Death Knight Darkreaver +UPDATE `creature_template` SET `minmana`=10272, `maxmana`=10272, `spells_template` = 145160, `AIName` = "EventAI", `ScriptName` = "" WHERE entry = 14516; +DELETE FROM `creature_ai_events` WHERE `creature_id` = 14516; +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES +(1451601, 14516, 0, 6, 0, 100, 0, 0, 0, 0, 0, 1451601, 0, 0, 'Death Knight Darkreaver - Cast Spell On Death'), +(1451602, 14516, 0, 11, 0, 100, 0, 0, 0, 0, 0, 1451602, 0, 0, 'Death Knight Darkreaver - Say Text On Just Spawn'); +DELETE FROM `creature_ai_scripts` WHERE `id` IN (1451601, 1451602, 1451603, 1451604, 1451605, 1451606); +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(1451601, 0, 15, 23261, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Knight Darkreaver - Cast Spell \'Summon Darkreaver\'s Fallen Charger\''), +(1451602, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 9784, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Knight Darkreaver - Say Text'); +REPLACE INTO `creature_spells` (`entry`, `name`, `spellId_1`, `probability_1`, `castTarget_1`, `targetParam1_1`, `targetParam2_1`, `castFlags_1`, `delayInitialMin_1`, `delayInitialMax_1`, `delayRepeatMin_1`, `delayRepeatMax_1`, `scriptId_1`, `spellId_2`, `probability_2`, `castTarget_2`, `targetParam1_2`, `targetParam2_2`, `castFlags_2`, `delayInitialMin_2`, `delayInitialMax_2`, `delayRepeatMin_2`, `delayRepeatMax_2`, `scriptId_2`, `spellId_3`, `probability_3`, `castTarget_3`, `targetParam1_3`, `targetParam2_3`, `castFlags_3`, `delayInitialMin_3`, `delayInitialMax_3`, `delayRepeatMin_3`, `delayRepeatMax_3`, `scriptId_3`, `spellId_4`, `probability_4`, `castTarget_4`, `targetParam1_4`, `targetParam2_4`, `castFlags_4`, `delayInitialMin_4`, `delayInitialMax_4`, `delayRepeatMin_4`, `delayRepeatMax_4`, `scriptId_4`, `spellId_5`, `probability_5`, `castTarget_5`, `targetParam1_5`, `targetParam2_5`, `castFlags_5`, `delayInitialMin_5`, `delayInitialMax_5`, `delayRepeatMin_5`, `delayRepeatMax_5`, `scriptId_5`, `spellId_6`, `probability_6`, `castTarget_6`, `targetParam1_6`, `targetParam2_6`, `castFlags_6`, `delayInitialMin_6`, `delayInitialMax_6`, `delayRepeatMin_6`, `delayRepeatMax_6`, `scriptId_6`, `spellId_7`, `probability_7`, `castTarget_7`, `targetParam1_7`, `targetParam2_7`, `castFlags_7`, `delayInitialMin_7`, `delayInitialMax_7`, `delayRepeatMin_7`, `delayRepeatMax_7`, `scriptId_7`, `spellId_8`, `probability_8`, `castTarget_8`, `targetParam1_8`, `targetParam2_8`, `castFlags_8`, `delayInitialMin_8`, `delayInitialMax_8`, `delayRepeatMin_8`, `delayRepeatMax_8`, `scriptId_8`) VALUES (145160, 'Scholomance - Death Knight Darkreaver', 22644, 100, 1, 0, 0, 0, 10, 12, 20, 25, 0, 15284, 100, 1, 0, 0, 0, 3, 4, 3, 6, 0, 7645, 100, 5, 0, 0, 0, 15, 17, 30, 40, 0, 17393, 100, 4, 0, 0, 0, 7, 9, 7, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt index 5c6074c5d..64a683629 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -184,7 +184,6 @@ set (SCRIPTS_SRCS eastern_kingdoms/undercity/undercity.cpp eastern_kingdoms/western_plaguelands/western_plaguelands.cpp eastern_kingdoms/western_plaguelands/scholomance/boss_darkmaster_gandling.cpp - eastern_kingdoms/western_plaguelands/scholomance/boss_death_knight_darkreaver.cpp eastern_kingdoms/western_plaguelands/scholomance/boss_doctor_theolen_krastinov.cpp eastern_kingdoms/western_plaguelands/scholomance/boss_illucia_barov.cpp eastern_kingdoms/western_plaguelands/scholomance/boss_instructor_malicia.cpp diff --git a/src/scripts/ScriptLoader.cpp b/src/scripts/ScriptLoader.cpp index 58b1c606a..643b3117e 100644 --- a/src/scripts/ScriptLoader.cpp +++ b/src/scripts/ScriptLoader.cpp @@ -128,7 +128,6 @@ void AddSC_boss_interrogator_vishas(); void AddSC_boss_mograine_and_whitemane(); void AddSC_instance_scarlet_monastery(); void AddSC_boss_darkmaster_gandling(); //scholomance -void AddSC_boss_death_knight_darkreaver(); void AddSC_boss_theolenkrastinov(); void AddSC_boss_illuciabarov(); void AddSC_boss_instructormalicia(); @@ -392,7 +391,6 @@ void AddScripts() AddSC_boss_mograine_and_whitemane(); AddSC_instance_scarlet_monastery(); AddSC_boss_darkmaster_gandling(); //scholomance - AddSC_boss_death_knight_darkreaver(); AddSC_boss_theolenkrastinov(); AddSC_boss_illuciabarov(); AddSC_boss_instructormalicia(); diff --git a/src/scripts/eastern_kingdoms/western_plaguelands/scholomance/boss_death_knight_darkreaver.cpp b/src/scripts/eastern_kingdoms/western_plaguelands/scholomance/boss_death_knight_darkreaver.cpp deleted file mode 100644 index cd0daf156..000000000 --- a/src/scripts/eastern_kingdoms/western_plaguelands/scholomance/boss_death_knight_darkreaver.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Boss_Death_knight_darkreaver -SD%Complete: 100 -SDComment: -SDCategory: Scholomance -EndScriptData */ - -#include "scriptPCH.h" - -struct boss_death_knight_darkreaverAI : public ScriptedAI -{ - boss_death_knight_darkreaverAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - void Reset() - { - } - - void DamageTaken(Unit *done_by, uint32 &damage) - { - if (m_creature->GetHealth() <= damage) - { - m_creature->CastSpell(m_creature, 23261, true); //Summon Darkreaver's Fallen Charger - } - } -}; - -CreatureAI* GetAI_boss_death_knight_darkreaver(Creature* pCreature) -{ - return new boss_death_knight_darkreaverAI(pCreature); -} - -void AddSC_boss_death_knight_darkreaver() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_death_knight_darkreaver"; - newscript->GetAI = &GetAI_boss_death_knight_darkreaver; - newscript->RegisterSelf(); -}