Ejemplo n.º 1
0
        protected List <PlaneModelBase> __CreatePlanes(List <ShipModel_Attacker> ships, List <int> plane_from)
        {
            List <PlaneModelBase> list = new List <PlaneModelBase>();

            for (int i = 0; i < plane_from.Count; i++)
            {
                int tmp_id = plane_from[i];
                ShipModel_Attacker shipModel_Attacker = ships.Find((ShipModel_Attacker item) => item.TmpId == tmp_id);
                if (shipModel_Attacker == null)
                {
                    continue;
                }
                List <SlotitemModel_Battle> slotitemList = shipModel_Attacker.SlotitemList;
                slotitemList = slotitemList.FindAll((SlotitemModel_Battle slot) => slot?.IsPlaneAtKouku() ?? false);
                if (slotitemList.Count > 0)
                {
                    for (int j = 0; j < slotitemList.Count; j++)
                    {
                        PlaneModel item2 = new PlaneModel(shipModel_Attacker, slotitemList[j].MstId);
                        list.Add(item2);
                    }
                }
            }
            return(list);
        }
        protected List <PlaneModelBase> __CreatePlanes(List <ShipModel_Attacker> ships, List <int> plane_from)
        {
            List <PlaneModelBase> list = new List <PlaneModelBase>();

            for (int i = 0; i < plane_from.get_Count(); i++)
            {
                int tmp_id = plane_from.get_Item(i);
                ShipModel_Attacker shipModel_Attacker = ships.Find((ShipModel_Attacker item) => item.TmpId == tmp_id);
                if (shipModel_Attacker != null)
                {
                    List <SlotitemModel_Battle> list2 = shipModel_Attacker.SlotitemList;
                    list2 = list2.FindAll((SlotitemModel_Battle slot) => slot != null && slot.IsPlaneAtKouku());
                    if (list2.get_Count() > 0)
                    {
                        for (int j = 0; j < list2.get_Count(); j++)
                        {
                            PlaneModel planeModel = new PlaneModel(shipModel_Attacker, list2.get_Item(j).MstId);
                            list.Add(planeModel);
                        }
                    }
                }
            }
            return(list);
        }