private static SlotView[] GetOtherSlots(SaveFile sav, bool HaX)
 {
     return(sav.GetExtraSlots(HaX).GroupBy(z => z.Type)
            .Select(z => new SlotArray(sav, z.ToArray(), true)
     {
         Type = z.Key
     })
            .Cast <SlotView>().ToArray());
 }
Esempio n. 2
0
        public static PKM[] GetExtraPKM(this SaveFile sav, IList <SlotInfoMisc> slots)
        {
            slots ??= sav.GetExtraSlots();
            var arr = new PKM[slots.Count];

            for (int i = 0; i < slots.Count; i++)
            {
                arr[i] = slots[i].Read(sav);
            }
            return(arr);
        }
Esempio n. 3
0
        public static PKM[] GetExtraPKM(this SaveFile sav, List <StorageSlotOffset> slots = null)
        {
            slots = slots ?? sav.GetExtraSlots();
            var arr = new PKM[slots.Count];

            for (int i = 0; i < slots.Count; i++)
            {
                arr[i] = sav.GetPKM(slots[i]);
            }
            return(arr);
        }
Esempio n. 4
0
        private static void AddExtraData(SaveFile sav, ConcurrentBag <SlotCache> db)
        {
            var extra = sav.GetExtraSlots(true);

            foreach (var x in extra)
            {
                var pk = x.Read(sav);
                if (pk.Species == 0)
                {
                    continue;
                }

                var result = new SlotCache(x, pk, sav);
                db.Add(result);
            }
        }
Esempio n. 5
0
 public static PKM[] GetExtraPKM(this SaveFile sav) => sav.GetExtraPKM(sav.GetExtraSlots());