mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 06:25:55 +00:00
fix(Scripts/Spells): some LW drums cannot affect targets lvl80 or higher (#24611)
This commit is contained in:
@@ -5696,6 +5696,28 @@ class spell_gen_whisper_to_controller : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 35475 Drums of War
|
||||
// 35476 Drums of Battle
|
||||
// 35478 Drums of Restoration
|
||||
class spell_gen_filter_party_level_80 : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_filter_party_level_80);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if([&](WorldObject* target) -> bool
|
||||
{
|
||||
Unit* unit = target->ToUnit();
|
||||
return unit && unit->GetLevel() >= 80;
|
||||
});
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_gen_filter_party_level_80::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_PARTY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -5871,4 +5893,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_bm_on);
|
||||
RegisterSpellScript(spell_gen_bm_off);
|
||||
RegisterSpellScript(spell_gen_whisper_to_controller);
|
||||
RegisterSpellScript(spell_gen_filter_party_level_80);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user