Formulae.CanLookupEquipmentParamOn C# (CSharp) Method

CanLookupEquipmentParamOn() protected method

protected CanLookupEquipmentParamOn ( string fname, LookupType type, Character, ccontext, Formula, f ) : bool
fname string
type LookupType
ccontext Character,
f Formula,
return bool
    protected bool CanLookupEquipmentParamOn(
		string fname, LookupType type,
		Character ccontext, Formula f
	)
    {
        if(ccontext != null) {
            var equips = ccontext.Equipment.Where(eq =>
                eq.Matches(f.equipmentSlots, f.equipmentCategories) &&
                (fname == null || eq.HasParam(fname))
            );
            return equips.Count() > 0;
        }
        return false;
    }