private static bool HasMegami(this ShipData ship) { return(ship?.ExSlot?.Source?.Id == 43 || ship?.FirstDameconOrNull()?.Source?.Id == 43); }
private static ShipSlotData FirstDameconOrNull(this ShipData ship) { return(ship?.Slots?.FirstOrDefault(x => x?.Source?.Id == 42 || x?.Source?.Id == 43)); }
public static int Count(this ShipData data, Type2 type2) { return(data.Slots.Count(x => x.Type2 == type2)); }