fix(Scripts/Spells): Fix Furious Howl not giving ranged attack power … (#17345)

This commit is contained in:
Skjalf
2023-09-25 21:31:36 -03:00
committed by GitHub
parent 2d3e9a8f23
commit e67a0b1a82
2 changed files with 30 additions and 0 deletions
@@ -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);
@@ -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<WorldObject*>& 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);
}