Exemple #1
0
        public static bool cb(CSVReader csv_reader, LimitedEquipItemExceedData data, ref uint key)
        {
            data.id = key;
            csv_reader.PopEnum(ref data.rarity, RARITY_TYPE.D);
            csv_reader.PopEnum(ref data.equipmentType, EQUIPMENT_TYPE.NONE);
            csv_reader.PopEnum(ref data.getType, GET_TYPE.NONE);
            csv_reader.Pop(ref data.eventId);
            csv_reader.Pop(ref data.equipmentId);
            ExceedNeedItem exceedNeedItem = new ExceedNeedItem();
            uint           value          = 0u;

            csv_reader.Pop(ref value);
            exceedNeedItem.itemId = value;
            exceedNeedItem.num    = new uint[4];
            for (int i = 0; i < exceedNeedItem.num.Length; i++)
            {
                csv_reader.Pop(ref exceedNeedItem.num[i]);
            }
            data.exceed = exceedNeedItem;
            return(true);
        }
Exemple #2
0
        public static bool cb(CSVReader csv_reader, EquipItemExceedData data, ref uint key1, ref uint key2)
        {
            data.rarity = (RARITY_TYPE)key1;
            csv_reader.Pop(ref data.getType);
            csv_reader.Pop(ref data.eventId);
            csv_reader.Pop(ref data.exchangeItemId);
            csv_reader.Pop(ref data.exchangeMoney);
            List <ExceedNeedItem> list = new List <ExceedNeedItem>();

            for (int i = 0; i < 5; i++)
            {
                uint value = 0u;
                csv_reader.Pop(ref value);
                if (value != 0)
                {
                    ExceedNeedItem item = new ExceedNeedItem();
                    item.itemId = value;
                    item.num    = new uint[4];
                    for (int j = 0; j < 4; j++)
                    {
                        csv_reader.Pop(ref item.num[j]);
                    }
                    ExceedNeedItem exceedNeedItem = list.Find((ExceedNeedItem _data) => _data.itemId == item.itemId);
                    if (exceedNeedItem == null)
                    {
                        list.Add(item);
                    }
                }
                else
                {
                    for (int k = 0; k < 4; k++)
                    {
                        uint value2 = 0u;
                        csv_reader.Pop(ref value2);
                    }
                }
            }
            data.exceed = list.ToArray();
            return(true);
        }