From 1753a8d0b93e6fd8449791b02593ae505b9594bb Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Wed, 11 Oct 2023 23:09:53 +0300 Subject: [PATCH] fix(Core/Spells): Call of the Wild targeting other players (#17485) * fix(Core/Spells): Call of the Wild targets * comment --- .../pending_db_world/rev_1697052883726753200.sql | 5 +++++ src/server/scripts/Spells/spell_hunter.cpp | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1697052883726753200.sql diff --git a/data/sql/updates/pending_db_world/rev_1697052883726753200.sql b/data/sql/updates/pending_db_world/rev_1697052883726753200.sql new file mode 100644 index 000000000..fa8923682 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1697052883726753200.sql @@ -0,0 +1,5 @@ +-- Call of the Wild +DELETE FROM `spell_script_names` WHERE `spell_id` IN (-24604,53434); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-24604, 'spell_hun_target_self_and_pet'), +(53434, 'spell_hun_target_self_and_pet'); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 4bbb80310..d898922be 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1308,9 +1308,11 @@ class spell_hun_bestial_wrath : public SpellScript } }; -class spell_hun_furious_howl : public SpellScript +// -24604 - Furious Howl +// 53434 - Call of the Wild +class spell_hun_target_self_and_pet : public SpellScript { - PrepareSpellScript(spell_hun_furious_howl); + PrepareSpellScript(spell_hun_target_self_and_pet); bool Load() override { @@ -1327,7 +1329,7 @@ class spell_hun_furious_howl : public SpellScript void Register() override { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_self_and_pet::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); } }; @@ -1361,5 +1363,5 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_lock_and_load); RegisterSpellScript(spell_hun_intimidation); RegisterSpellScript(spell_hun_bestial_wrath); - RegisterSpellScript(spell_hun_furious_howl); + RegisterSpellScript(spell_hun_target_self_and_pet); }