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
@@ -132,14 +132,14 @@ class spell_pri_mind_sear : public SpellScriptLoader
{
PrepareSpellScript(spell_pri_mind_sear_SpellScript);
void FilterTargets(std::list<Unit*>& unitList)
void FilterTargets(std::list<WorldObject*>& unitList)
{
unitList.remove_if (Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT)));
unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT)));
}
void Register()
{
OnUnitTargetSelect += SpellUnitTargetFn(spell_pri_mind_sear_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_mind_sear_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
}
};