Core/SpellScripts: Changed OnUnitTargetSelect hook to OnObjectAreaTargetSelect, it will now work with WorldObject instead of only Units and call it even for empty target lists

This commit is contained in:
Shauren committed 2012-06-29 21:53:35 +02:00
1 parent 6e4da3367a
commit e0997874f5
44 files changed
+368 -351

No files matched your search

+3 -3
View File
@@ -302,15 +302,15 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader
{
PrepareSpellScript(spell_warl_seed_of_corruption_SpellScript);
void FilterTargets(std::list<Unit*>& unitList)
void FilterTargets(std::list<WorldObject*>& targets)
{
if (GetExplTargetUnit())
unitList.remove(GetExplTargetUnit());
targets.remove(GetExplTargetUnit());
}
void Register()
{
OnUnitTargetSelect += SpellUnitTargetFn(spell_warl_seed_of_corruption_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warl_seed_of_corruption_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
}
};