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; }