internal EquipmentGroupByLevel(EquipmentGroupByMasterID rpOwner, EquipmentGroupingKey rpKey, IEnumerable<Equipment> rpEquipment)
        {
            r_Owner = rpOwner;

            Key = rpKey;
            r_Fleets = new ListDictionary<int, EquipmentGroupByFleet>();

            Count = rpEquipment.Count();

            var rUnequipedEquipment = KanColleGame.Current.Port.UnequippedEquipment[r_Owner.Info.Type];
            if (rUnequipedEquipment == null)
                RemainingCount = 0;
            else
                RemainingCount = rUnequipedEquipment.Count(r => r.Info == r_Owner.Info && r.Level == Key.Level && r.Proficiency == Key.Proficiency);
        }
예제 #2
0
        internal EquipmentGroupByLevel(EquipmentGroupByMasterID rpOwner, EquipmentGroupingKey rpKey, IEnumerable <Equipment> rpEquipment)
        {
            r_Owner = rpOwner;

            Key      = rpKey;
            r_Fleets = new ListDictionary <int, EquipmentGroupByFleet>();

            Count = rpEquipment.Count();

            Equipment[] rUnequipedEquipment;
            if (!KanColleGame.Current.Port.UnequippedEquipment.TryGetValue(r_Owner.Info.Type, out rUnequipedEquipment) || rUnequipedEquipment == null)
            {
                RemainingCount = 0;
            }
            else
            {
                RemainingCount = rUnequipedEquipment.Count(r => r.Info == r_Owner.Info && r.Level == Key.Level && r.Proficiency == Key.Proficiency);
            }
        }