From a88725c8bfc2090f40292327eb12f2df11566591 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Thu, 21 Mar 2019 23:45:29 +0100 Subject: [PATCH] Core/Spells: Death Knight's Ghoul Taunt will no longer taunt bosses --- .../custom/custom_2019_03_21_00_world.sql | 3 +++ src/server/scripts/Spells/spell_dk.cpp | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 sql/updates/world/custom/custom_2019_03_21_00_world.sql diff --git a/sql/updates/world/custom/custom_2019_03_21_00_world.sql b/sql/updates/world/custom/custom_2019_03_21_00_world.sql new file mode 100644 index 0000000000..fd30fbb623 --- /dev/null +++ b/sql/updates/world/custom/custom_2019_03_21_00_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dk_ghoul_taunt'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(43263, 'spell_dk_ghoul_taunt'); diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 1ff48cf1af..9de9b17a76 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1791,6 +1791,25 @@ class spell_dk_ebon_plaguebringer : public AuraScript } }; +class spell_dk_ghoul_taunt : public SpellScript +{ + PrepareSpellScript(spell_dk_ghoul_taunt); + + void HandleTaunt(SpellEffIndex /*effIndex*/) + { + if (GetHitCreature() && (GetHitCreature()->IsDungeonBoss() || GetHitCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_BOSS_MOB)) + { + PreventHitDefaultEffect(EFFECT_0); + PreventHitDefaultEffect(EFFECT_1); + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_dk_ghoul_taunt::HandleTaunt, EFFECT_0, SPELL_EFFECT_ATTACK_ME); + } +}; + void AddSC_deathknight_spell_scripts() { RegisterAuraScript(spell_dk_anti_magic_shell); @@ -1818,6 +1837,7 @@ void AddSC_deathknight_spell_scripts() RegisterAuraScript(spell_dk_disease); RegisterAuraScript(spell_dk_ebon_plaguebringer); RegisterSpellScript(spell_dk_ghoul_explode); + RegisterSpellScript(spell_dk_ghoul_taunt); RegisterSpellScript(spell_dk_howling_blast); RegisterAuraScript(spell_dk_icebound_fortitude); RegisterAuraScript(spell_dk_improved_blood_presence);