private static void CreateTargetConditions(ref Skill ability)
{
//No Conditions Set by default.. (?? May have to verify Ability execution can be Target)
//-- Ranged Abilities that do not set any single target conditions will never be checked for LOS.
if (ability.SingleUnitCondition.Count == 0)
{
//No Default Conditions Set.. however if Ability uses target as a execution type then we implement the LOS conditions.
if (ObjectCache.CheckFlag(ability.ExecutionType, SkillExecutionFlags.Target))
ability.SingleUnitCondition.Add(new UnitTargetConditions(TargetProperties.None));
else
return;
}
//Attach Line of Sight Criteria to each entry
foreach (UnitTargetConditions condition in ability.SingleUnitCondition)
{
var combatCriteria = condition.Criteria;
CreateLineOfSightTargetCheck(ref combatCriteria, ability);
condition.Criteria = combatCriteria;
}
}