Exemple #1
0
        private static void AddBoxData(SaveFile sav, ConcurrentBag <SlotCache> db)
        {
            var bd  = sav.BoxData;
            var bc  = sav.BoxCount;
            var sc  = sav.BoxSlotCount;
            int ctr = 0;

            for (int box = 0; box < bc; box++)
            {
                for (int slot = 0; slot < sc; slot++, ctr++)
                {
                    var ident  = new SlotInfoBox(box, slot);
                    var result = new SlotCache(ident, bd[ctr], sav);
                    db.Add(result);
                }
            }
        }
Exemple #2
0
        public static void AddBoxData(SaveFile sav, ICollection <SlotCache> db)
        {
            var bd  = sav.BoxData;
            var bc  = sav.BoxCount;
            var sc  = sav.BoxSlotCount;
            int ctr = 0;

            for (int box = 0; box < bc; box++)
            {
                for (int slot = 0; slot < sc; slot++, ctr++)
                {
                    var ident  = new SlotInfoBox(box + 1, slot + 1);
                    var result = new SlotCache(ident, bd[ctr], sav);
                    db.Add(result);
                }
            }
        }