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

View File

@@ -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);
}