Core/Spells: Adding SpellTargetObjectTypes to spell target checker to early-eliminate alive units

Port From (https://github.com/TrinityCore/TrinityCore/commit/0cae71eac58bf37c6a2cbce2a60dd2aa1f7b4314)
This commit is contained in:
hondacrx
2021-02-09 13:02:06 -05:00
parent a3e2e957c9
commit addc831f0d
5 changed files with 32 additions and 61 deletions
+2 -2
View File
@@ -2742,11 +2742,11 @@ namespace Game.Maps
public class AnyDeadUnitSpellTargetInRangeCheck<T> : AnyDeadUnitObjectInRangeCheck<T> where T : WorldObject
{
public AnyDeadUnitSpellTargetInRangeCheck(Unit searchObj, float range, SpellInfo spellInfo, SpellTargetCheckTypes check)
public AnyDeadUnitSpellTargetInRangeCheck(Unit searchObj, float range, SpellInfo spellInfo, SpellTargetCheckTypes check, SpellTargetObjectTypes objectType)
: base(searchObj, range)
{
i_spellInfo = spellInfo;
i_check = new WorldObjectSpellTargetCheck(searchObj, searchObj, spellInfo, check, null);
i_check = new WorldObjectSpellTargetCheck(searchObj, searchObj, spellInfo, check, null, objectType);
}
public override bool Invoke(T obj)