From b335e44fd85993b8813d1aec80e5df0545015dce Mon Sep 17 00:00:00 2001 From: ratkosrb Date: Thu, 8 Apr 2021 03:08:28 +0300 Subject: [PATCH] Add old levels for Duskwood bossed and remove useless script. Closes https://github.com/vmangos/core/pull/1083 --- sql/migrations/20210408000405_world.sql | 41 +++++++++++ src/scripts/CMakeLists.txt | 1 - src/scripts/ScriptLoader.cpp | 2 - src/scripts/world/spell_scripts.cpp | 95 ------------------------- 4 files changed, 41 insertions(+), 98 deletions(-) create mode 100644 sql/migrations/20210408000405_world.sql delete mode 100644 src/scripts/world/spell_scripts.cpp diff --git a/sql/migrations/20210408000405_world.sql b/sql/migrations/20210408000405_world.sql new file mode 100644 index 000000000..78089f9ff --- /dev/null +++ b/sql/migrations/20210408000405_world.sql @@ -0,0 +1,41 @@ +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`='20210408000405'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20210408000405'); +-- Add your query below. + + +-- Morbent fel should be level 35 pre patch 1.6 +DELETE FROM `creature_template` WHERE `entry`=1200; +INSERT INTO `creature_template` (`entry`, `patch`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `name`, `subname`, `gossip_menu_id`, `level_min`, `level_max`, `health_min`, `health_max`, `mana_min`, `mana_max`, `armor`, `faction`, `npc_flags`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `rank`, `xp_multiplier`, `dmg_min`, `dmg_max`, `dmg_school`, `attack_power`, `dmg_multiplier`, `base_attack_time`, `ranged_attack_time`, `unit_class`, `unit_flags`, `dynamic_flags`, `beast_family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `ranged_dmg_min`, `ranged_dmg_max`, `ranged_attack_power`, `type`, `type_flags`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `auras`, `gold_min`, `gold_max`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `regeneration`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `flags_extra`, `script_name`) VALUES (1200, 0, 4272, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 'Morbent Fel', '', 0, 35, 32, 4059, 3609, 4020, 3543, 751, 21, 0, 1, 1.14286, 20, 5, 0, 1, 1, 193, 249, 0, 128, 1, 2000, 2000, 8, 32832, 0, 0, 0, 0, 0, 0, 44.84, 61.655, 100, 7, 0, 1200, 1200, 0, 0, 0, 0, 0, 0, 0, 3108, 3109, 8909, 0, 12000, 0, NULL, 209, 277, 'EventAI', 1, 3, 0, 0, 3, 1200, 0, 0, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `patch`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `name`, `subname`, `gossip_menu_id`, `level_min`, `level_max`, `health_min`, `health_max`, `mana_min`, `mana_max`, `armor`, `faction`, `npc_flags`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `rank`, `xp_multiplier`, `dmg_min`, `dmg_max`, `dmg_school`, `attack_power`, `dmg_multiplier`, `base_attack_time`, `ranged_attack_time`, `unit_class`, `unit_flags`, `dynamic_flags`, `beast_family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `ranged_dmg_min`, `ranged_dmg_max`, `ranged_attack_power`, `type`, `type_flags`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `auras`, `gold_min`, `gold_max`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `regeneration`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `flags_extra`, `script_name`) VALUES (1200, 4, 4272, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 'Morbent Fel', '', 0, 32, 32, 3609, 3609, 3543, 3543, 694, 21, 0, 1, 1.14286, 20, 5, 0, 1, 1, 77, 102, 0, 128, 1, 2000, 2000, 8, 32832, 0, 0, 0, 0, 0, 0, 44.84, 61.655, 100, 7, 0, 1200, 1200, 0, 0, 0, 0, 0, 0, 0, 3108, 3109, 8909, 0, 12000, 0, NULL, 209, 277, 'EventAI', 1, 3, 0, 0, 3, 1200, 0, 0, 0, 0, 0, ''); + +-- Stalvan Mistmantle should be level 35 pre patch 1.6 +DELETE FROM `creature_template` WHERE `entry`=315; +INSERT INTO `creature_template` (`entry`, `patch`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `name`, `subname`, `gossip_menu_id`, `level_min`, `level_max`, `health_min`, `health_max`, `mana_min`, `mana_max`, `armor`, `faction`, `npc_flags`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `rank`, `xp_multiplier`, `dmg_min`, `dmg_max`, `dmg_school`, `attack_power`, `dmg_multiplier`, `base_attack_time`, `ranged_attack_time`, `unit_class`, `unit_flags`, `dynamic_flags`, `beast_family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `ranged_dmg_min`, `ranged_dmg_max`, `ranged_attack_power`, `type`, `type_flags`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `auras`, `gold_min`, `gold_max`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `regeneration`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `flags_extra`, `script_name`) VALUES (315, 0, 1562, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 'Stalvan Mistmantle', '', 0, 35, 35, 1830, 1830, 0, 0, 1373, 14, 0, 1, 1.14286, 18, 5, 0, 0, 1, 61, 80, 0, 128, 1, 1500, 2000, 1, 32768, 0, 0, 0, 0, 0, 0, 53.8384, 74.0278, 100, 6, 0, 315, 315, 0, 0, 0, 0, 0, 0, 0, 3105, 0, 0, 0, 3150, 0, NULL, 58, 81, 'EventAI', 0, 3, 0, 0, 3, 315, 0, 0, 8388624, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `patch`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `name`, `subname`, `gossip_menu_id`, `level_min`, `level_max`, `health_min`, `health_max`, `mana_min`, `mana_max`, `armor`, `faction`, `npc_flags`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `rank`, `xp_multiplier`, `dmg_min`, `dmg_max`, `dmg_school`, `attack_power`, `dmg_multiplier`, `base_attack_time`, `ranged_attack_time`, `unit_class`, `unit_flags`, `dynamic_flags`, `beast_family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `ranged_dmg_min`, `ranged_dmg_max`, `ranged_attack_power`, `type`, `type_flags`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `auras`, `gold_min`, `gold_max`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `regeneration`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `flags_extra`, `script_name`) VALUES (315, 4, 1562, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 'Stalvan Mistmantle', '', 0, 32, 32, 1585, 1585, 0, 0, 1270, 14, 0, 1, 1.14286, 18, 5, 0, 0, 1, 57, 76, 0, 128, 1, 1500, 2000, 1, 32768, 0, 0, 0, 0, 0, 0, 53.8384, 74.0278, 100, 6, 0, 315, 315, 0, 0, 0, 0, 0, 0, 0, 3105, 0, 0, 0, 3150, 0, NULL, 58, 81, 'EventAI', 0, 3, 0, 0, 3, 315, 0, 0, 8388624, 0, 0, ''); + +-- Zzarc' Vul should be level 33 pre patch 1.6 +DELETE FROM `creature_template` WHERE `entry`=300; +INSERT INTO `creature_template` (`entry`, `patch`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `name`, `subname`, `gossip_menu_id`, `level_min`, `level_max`, `health_min`, `health_max`, `mana_min`, `mana_max`, `armor`, `faction`, `npc_flags`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `rank`, `xp_multiplier`, `dmg_min`, `dmg_max`, `dmg_school`, `attack_power`, `dmg_multiplier`, `base_attack_time`, `ranged_attack_time`, `unit_class`, `unit_flags`, `dynamic_flags`, `beast_family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `ranged_dmg_min`, `ranged_dmg_max`, `ranged_attack_power`, `type`, `type_flags`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `auras`, `gold_min`, `gold_max`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `regeneration`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `flags_extra`, `script_name`) VALUES (300, 0, 655, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 'Zzarc\' Vul', '', 0, 33, 33, 1221, 1221, 0, 0, 1304, 45, 0, 1, 1.14286, 18, 5, 0, 0, 1, 45, 61, 0, 132, 1, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 0, 53.8384, 74.0278, 100, 7, 0, 300, 300, 0, 0, 0, 0, 0, 0, 0, 8716, 0, 0, 0, 3000, 0, NULL, 44, 62, '', 0, 3, 0, 0, 3, 300, 0, 0, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `patch`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `display_scale1`, `display_scale2`, `display_scale3`, `display_scale4`, `display_probability1`, `display_probability2`, `display_probability3`, `display_probability4`, `display_total_probability`, `mount_display_id`, `name`, `subname`, `gossip_menu_id`, `level_min`, `level_max`, `health_min`, `health_max`, `mana_min`, `mana_max`, `armor`, `faction`, `npc_flags`, `speed_walk`, `speed_run`, `detection_range`, `call_for_help_range`, `leash_range`, `rank`, `xp_multiplier`, `dmg_min`, `dmg_max`, `dmg_school`, `attack_power`, `dmg_multiplier`, `base_attack_time`, `ranged_attack_time`, `unit_class`, `unit_flags`, `dynamic_flags`, `beast_family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `ranged_dmg_min`, `ranged_dmg_max`, `ranged_attack_power`, `type`, `type_flags`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `auras`, `gold_min`, `gold_max`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `regeneration`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `flags_extra`, `script_name`) VALUES (300, 4, 655, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 'Zzarc\' Vul', '', 0, 30, 30, 1050, 1050, 0, 0, 1200, 45, 0, 1, 1.14286, 18, 5, 0, 0, 1, 42, 56, 0, 132, 1, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 0, 53.8384, 74.0278, 100, 7, 0, 300, 300, 0, 0, 0, 0, 0, 0, 0, 8716, 0, 0, 0, 3000, 0, NULL, 44, 62, '', 0, 3, 0, 0, 3, 300, 0, 0, 0, 0, 0, ''); + +-- Events list for Blazerunner +DELETE FROM `creature_ai_events` WHERE `creature_id`=9376; +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 (937601, 9376, 0, 1, 0, 100, 0, 0, 0, 0, 0, 937601, 0, 0, 'Blazerunner - Cast Blazerunner Aura'); +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 (937602, 9376, 0, 8, 0, 100, 1, 14247, -1, 1000, 1000, 937602, 0, 0, 'Blazerunner - Remove Aura on Hit By Spell Blazerunner Dispel'); +DELETE FROM `creature_ai_scripts` WHERE `id`=937602; +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 (937602, 0, 14, 13913, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Blazerunner - Remove Aura Blazerunner\'s Aura'); +UPDATE `creature_template` SET `script_name`='' WHERE `entry`=9376; + + +-- 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 d5de07d5a..0b49e7c99 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -261,7 +261,6 @@ set (SCRIPTS_SRCS world/fireworks_show.cpp world/go_scripts.cpp world/npcs_special.cpp - world/spell_scripts.cpp world/totems.cpp world/world_event_naxxramas.cpp world/world_event_naxxramas.h diff --git a/src/scripts/ScriptLoader.cpp b/src/scripts/ScriptLoader.cpp index 5d3094807..147f0d78b 100644 --- a/src/scripts/ScriptLoader.cpp +++ b/src/scripts/ScriptLoader.cpp @@ -39,7 +39,6 @@ void AddSC_npcs_special(); void AddSC_Totems(); void AddSC_world_event_naxxramas(); void AddSC_event_scourge_invasion(); -void AddSC_spell_scripts(); //eastern kingdoms void AddSC_instance_blackrock_spire(); @@ -289,7 +288,6 @@ void AddScripts() AddSC_Totems(); AddSC_world_event_naxxramas(); AddSC_event_scourge_invasion(); - AddSC_spell_scripts(); AddSC_war_effort(); diff --git a/src/scripts/world/spell_scripts.cpp b/src/scripts/world/spell_scripts.cpp deleted file mode 100644 index c34f412f4..000000000 --- a/src/scripts/world/spell_scripts.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright (C) 2006 - 2010 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: Spell_Scripts -SD%Complete: 100 -SDComment: Spell scripts for dummy effects (if script need access/interaction with parts of other AI or instance, add it in related source files) -SDCategory: Spell -EndScriptData */ - -/* ContentData -spell 34665 -spell 19512 -spell 8913 -spell 29528 -spell 46770 -spell 46023 -spell 47575 -spell 50706 -EndContentData */ - -#include "scriptPCH.h" - -/* When you make a spell effect: -- always check spell id and effect index -- always return true when the spell is handled by script -*/ - -enum -{ - // target morbent fel - SPELL_SACRED_CLEANSING = 8913, - NPC_MORBENT = 1200, - NPC_WEAKENED_MORBENT = 24782, - - // target blazerunner - SPELL_BLAZERUNNER_DISPELL = 14247, - NPC_BLAZERUNNER = 9376, - SPELL_BLAZERUNNER_AURA = 13913 -}; - -bool EffectDummyCreature_spell_dummy_npc(WorldObject* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) -{ - switch (uiSpellId) - { - case SPELL_BLAZERUNNER_DISPELL: - { - if (uiEffIndex == EFFECT_INDEX_0) - { - if (pCreatureTarget->GetEntry() != NPC_BLAZERUNNER) - return true; - - pCreatureTarget->RemoveAurasDueToSpell(SPELL_BLAZERUNNER_AURA); - } - return true; - } - case SPELL_SACRED_CLEANSING: - { - if (uiEffIndex == EFFECT_INDEX_1) - { - if (pCreatureTarget->GetEntry() != NPC_MORBENT) - return true; - - pCreatureTarget->UpdateEntry(NPC_WEAKENED_MORBENT); - return true; - } - return true; - } - } - - return false; -} - -void AddSC_spell_scripts() -{ - Script* newscript; - - newscript = new Script; - newscript->Name = "spell_dummy_npc"; - newscript->pEffectDummyCreature = &EffectDummyCreature_spell_dummy_npc; - newscript->RegisterSelf(); -}