From 039f0e0faa081352d19f34b6f0abaa4e74414988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Fri, 18 Jun 2021 17:20:39 +0200 Subject: [PATCH] fix(DB/spell_dbc): Imp's Phase Shift (#6408) --- .../rev_1623952547067832000.sql | 10 +++++ src/server/scripts/Pet/CMakeLists.txt | 1 - src/server/scripts/Pet/pet_warlock.cpp | 42 ------------------- src/server/scripts/ScriptLoader.cpp | 2 - 4 files changed, 10 insertions(+), 45 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1623952547067832000.sql delete mode 100644 src/server/scripts/Pet/pet_warlock.cpp diff --git a/data/sql/updates/pending_db_world/rev_1623952547067832000.sql b/data/sql/updates/pending_db_world/rev_1623952547067832000.sql new file mode 100644 index 000000000..dc7d71afc --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1623952547067832000.sql @@ -0,0 +1,10 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1623952547067832000'); + +-- note: this is not ideal, it should be instead: +-- - an INSERT IGNORE containing the default DBC values +-- - and an UPDATE containing only the change +-- but the original author is gone and I do not know what fields are changing, so I'll leave it as it is +DELETE FROM `spell_dbc` WHERE (`ID` = 4511); +INSERT INTO `spell_dbc` VALUES (4511, 0, 0, 0, 301989888, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10000, 0, 0, 4, 0, 0, 101, 0, 0, 12, 12, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 93, 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, 72, 0, 211, 122, 0, 'Phase Shift','','','','','','','','', 0, 0, 0, 0, 0, 0, 0, 16712190,'','','','','','','','','', 0, 0, 0, 0, 0, 0, 0, 16712190, 'Shifts the imp out of phase with the world, making it unattackable unless it attacks.', null, null, null, null, null, null, null, null, 0, 0, 0, 0, 0, 0, 0, 16712190, 'Unattackable.','','','','','','','','', 0, 0, 0, 0, 0, 0, 0, 16712190, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0); + +UPDATE `creature_template` SET `faction` = 73, `type_flags` = 4096, `ScriptName` = '' WHERE (`entry` = 416); diff --git a/src/server/scripts/Pet/CMakeLists.txt b/src/server/scripts/Pet/CMakeLists.txt index f68ace2c8..f63f1a586 100644 --- a/src/server/scripts/Pet/CMakeLists.txt +++ b/src/server/scripts/Pet/CMakeLists.txt @@ -16,7 +16,6 @@ set(scripts_STAT_SRCS ${AC_SCRIPTS_DIR}/Pet/pet_mage.cpp ${AC_SCRIPTS_DIR}/Pet/pet_priest.cpp ${AC_SCRIPTS_DIR}/Pet/pet_shaman.cpp - ${AC_SCRIPTS_DIR}/Pet/pet_warlock.cpp ) AC_ADD_SCRIPT_LOADER("Pet" "ScriptLoader.h") diff --git a/src/server/scripts/Pet/pet_warlock.cpp b/src/server/scripts/Pet/pet_warlock.cpp deleted file mode 100644 index ea6d364bf..000000000 --- a/src/server/scripts/Pet/pet_warlock.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version. - */ - -/* - * Ordered alphabetically using scriptname. - * Scriptnames of files in this file should be prefixed with "npc_pet_warlock_". - */ - -#include "ScriptedCreature.h" -#include "ScriptMgr.h" - -enum WarlockSpells -{ - SPELL_WARLOCK_PHASE_SHIFT = 4511, // Imp spell -}; - -class npc_pet_warlock_imp : public CreatureScript -{ -public: - npc_pet_warlock_imp() : CreatureScript("npc_pet_warlock_imp") { } - - struct npc_pet_warlock_impAI : public ScriptedAI - { - npc_pet_warlock_impAI(Creature* creature) : ScriptedAI(creature) { } - - void EnterCombat(Unit* /*who*/) override - { - me->RemoveAurasDueToSpell(SPELL_WARLOCK_PHASE_SHIFT); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_pet_warlock_impAI(creature); - } -}; - -void AddSC_warlock_pet_scripts() -{ - new npc_pet_warlock_imp(); -} diff --git a/src/server/scripts/ScriptLoader.cpp b/src/server/scripts/ScriptLoader.cpp index 5f3e3fc31..fefd53245 100644 --- a/src/server/scripts/ScriptLoader.cpp +++ b/src/server/scripts/ScriptLoader.cpp @@ -565,7 +565,6 @@ void AddSC_hunter_pet_scripts(); void AddSC_mage_pet_scripts(); void AddSC_priest_pet_scripts(); void AddSC_shaman_pet_scripts(); -void AddSC_warlock_pet_scripts(); // battlegrounds @@ -1172,7 +1171,6 @@ void AddPetScripts() AddSC_mage_pet_scripts(); AddSC_priest_pet_scripts(); AddSC_shaman_pet_scripts(); - AddSC_warlock_pet_scripts(); #endif }