diff --git a/data/sql/updates/pending_db_world/rev_1695604876617457700.sql b/data/sql/updates/pending_db_world/rev_1695604876617457700.sql new file mode 100644 index 000000000..ba48608ae --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695604876617457700.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`= -24604 AND `ScriptName` = 'spell_hun_furious_howl'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(-24604, 'spell_hun_furious_howl'); + +DELETE FROM `spell_dbc` WHERE `ID` IN (24604, 64491, 64492, 64493, 64494, 64495, 53434); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 7f3468659..4bbb80310 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1308,6 +1308,29 @@ class spell_hun_bestial_wrath : public SpellScript } }; +class spell_hun_furious_howl : public SpellScript +{ + PrepareSpellScript(spell_hun_furious_howl); + + bool Load() override + { + return GetCaster()->IsPet(); + } + + void FilterTargets(std::list& targets) + { + targets.remove_if([&](WorldObject const* target) -> bool + { + return target != GetCaster() && target != GetCaster()->ToPet()->GetOwner(); + }); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl::FilterTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_PARTY); + } +}; + void AddSC_hunter_spell_scripts() { RegisterSpellScript(spell_hun_check_pet_los); @@ -1338,4 +1361,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); }