fix(Scripts/RuinsOfAhnQiraj): Anubisath Defender's shadow storm shoul… (#12844)

fix(Scripts/RuinsOfAhnQiraj): Anubisath Defender's shadow storm should not hit enemies within 25 yards
This commit is contained in:
Skjalf
2022-08-24 23:36:04 -03:00
committed by GitHub
parent 0ed4a5e761
commit b1f53e19b0
2 changed files with 25 additions and 0 deletions

View File

@@ -470,10 +470,30 @@ class spell_crystal_weakness : public SpellScript
}
};
class spell_aq_shadow_storm : public SpellScript
{
PrepareSpellScript(spell_aq_shadow_storm);
void FilterTargets(std::list<WorldObject*>& targets)
{
Unit* caster = GetCaster();
targets.remove_if([caster](WorldObject const* obj)
{
return caster->GetExactDist2d(obj) < 25.0f;
});
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_aq_shadow_storm::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
void AddSC_boss_ossirian()
{
RegisterRuinsOfAhnQirajCreatureAI(boss_ossirian);
new go_ossirian_crystal();
RegisterCreatureAI(npc_anubisath_guardian);
RegisterSpellScript(spell_crystal_weakness);
RegisterSpellScript(spell_aq_shadow_storm);
}