Hi all,
i'm trying to filters only enemies from a diaUnit list.. Figured out from looking in reference:
Is this correct? Is there another better way?
i'm trying to filters only enemies from a diaUnit list.. Figured out from looking in reference:
Code:
List<DiaUnit> CurrentValidEnemiesLists = unitsList.Where(
o => o.IsValid &&
o.CommonData != null &&
o.CommonData.IsValid &&
(o.ActorType == Zeta.Game.Internals.SNO.ActorType.Monster)&&
(
o.MonsterInfo.MonsterType==Zeta.Game.Internals.SNO.MonsterType.Beast ||
o.MonsterInfo.MonsterType==Zeta.Game.Internals.SNO.MonsterType.BloodGolem ||
o.MonsterInfo.MonsterType==Zeta.Game.Internals.SNO.MonsterType.CorruptedAngel ||
o.MonsterInfo.MonsterType==Zeta.Game.Internals.SNO.MonsterType.Demon ||
o.MonsterInfo.MonsterType==Zeta.Game.Internals.SNO.MonsterType.Human ||
o.MonsterInfo.MonsterType==Zeta.Game.Internals.SNO.MonsterType.Pandemonium ||
o.MonsterInfo.MonsterType==Zeta.Game.Internals.SNO.MonsterType.Undead
)
).ToList();
Is this correct? Is there another better way?