示例#1
0
        public void LoadFromBinary(BinaryTableReader reader, ref uint key)
        {
            id                = key;
            locationNumber    = reader.ReadString(string.Empty);
            deliveryNumber    = reader.ReadString(string.Empty);
            name              = reader.ReadString(string.Empty);
            type              = (DELIVERY_TYPE)reader.ReadUInt32(0u);
            subType           = (DELIVERY_SUB_TYPE)reader.ReadUInt32(0u);
            textType          = (DELIVERY_TYPE)reader.ReadUInt32(0u);
            eventID           = reader.ReadInt32(0);
            fieldMode         = (DIFFICULTY_MODE)reader.ReadUInt32(0u);
            difficulty        = (DIFFICULTY_MODE)reader.ReadUInt32(0u);
            npcID             = reader.ReadUInt32(0u);
            npcComment        = reader.ReadString(string.Empty);
            npcClearComment   = reader.ReadString(string.Empty);
            clearEventID      = reader.ReadUInt32(0u);
            clearEventTitle   = reader.ReadString(string.Empty);
            jumpType          = reader.ReadInt32(0);
            jumpMapID         = reader.ReadInt32(0);
            targetPortalID[0] = reader.ReadInt32(0);
            targetPortalID[1] = reader.ReadInt32(0);
            targetPortalID[2] = reader.ReadInt32(0);
            placeName         = reader.ReadString(string.Empty);
            enemyName         = reader.ReadString(string.Empty);
            appearQuestId     = reader.ReadUInt32(0u);
            appearDeliveryId  = reader.ReadUInt32(0u);
            List <NeedData> list = new List <NeedData>();
            int             i    = 0;

            for (int num = 5; i < num; i++)
            {
                DELIVERY_CONDITION_TYPE dELIVERY_CONDITION_TYPE = DELIVERY_CONDITION_TYPE.NONE;
                uint num2    = 0u;
                uint num3    = 0u;
                uint questId = 0u;
                DELIVERY_RATE_TYPE dELIVERY_RATE_TYPE = DELIVERY_RATE_TYPE.RATE_10000;
                string             empty = string.Empty;
                uint num4 = 0u;
                uint num5 = 0u;
                dELIVERY_CONDITION_TYPE = (DELIVERY_CONDITION_TYPE)reader.ReadUInt32(0u);
                num2 = reader.ReadUInt32(0u);
                num3 = reader.ReadUInt32(0u);
                if (i == 0)
                {
                    questId = reader.ReadUInt32(0u);
                }
                dELIVERY_RATE_TYPE = (DELIVERY_RATE_TYPE)reader.ReadUInt32(0u);
                empty = reader.ReadString(string.Empty);
                num4  = reader.ReadUInt32(0u);
                num5  = reader.ReadUInt32(0u);
                NeedData needData = new NeedData(dELIVERY_CONDITION_TYPE, num2, num3, questId, dELIVERY_RATE_TYPE, empty, num4, num5);
                if (needData.IsValid())
                {
                    list.Add(needData);
                }
            }
            needs = list.ToArray();
            if (string.IsNullOrEmpty(locationNumber))
            {
                locationNumber = (id / 100u % 1000u).ToString();
            }
            if (string.IsNullOrEmpty(deliveryNumber))
            {
                deliveryNumber = (id % 100u).ToString();
            }
        }
示例#2
0
        public static bool cb(CSVReader csv_reader, DeliveryData data, ref uint key)
        {
            data.id = key;
            csv_reader.Pop(ref data.locationNumber);
            csv_reader.Pop(ref data.deliveryNumber);
            csv_reader.Pop(ref data.name);
            csv_reader.Pop(ref data.type);
            csv_reader.PopEnum(ref data.subType, DELIVERY_SUB_TYPE.NONE);
            csv_reader.PopEnum(ref data.textType, DELIVERY_TYPE.ETC);
            csv_reader.PopEnum(ref data.clearIngameType, CLEAR_INGAME.DEAFULT);
            csv_reader.Pop(ref data.eventID);
            csv_reader.Pop(ref data.fieldMode);
            csv_reader.Pop(ref data.difficulty);
            csv_reader.Pop(ref data.npcID);
            csv_reader.Pop(ref data.npcComment);
            csv_reader.Pop(ref data.npcClearComment);
            csv_reader.Pop(ref data.clearEventID);
            csv_reader.Pop(ref data.clearEventTitle);
            csv_reader.Pop(ref data.jumpType);
            csv_reader.Pop(ref data.jumpMapID);
            csv_reader.Pop(ref data.targetPortalID[0]);
            csv_reader.Pop(ref data.targetPortalID[1]);
            csv_reader.Pop(ref data.targetPortalID[2]);
            csv_reader.Pop(ref data.placeName);
            csv_reader.Pop(ref data.enemyName);
            csv_reader.Pop(ref data.appearQuestId);
            csv_reader.Pop(ref data.appearDeliveryId);
            List <NeedData> list = new List <NeedData>();
            int             i    = 0;

            for (int num = 5; i < num; i++)
            {
                DELIVERY_CONDITION_TYPE value = DELIVERY_CONDITION_TYPE.NONE;
                uint value2 = 0u;
                uint value3 = 0u;
                uint value4 = 0u;
                DELIVERY_RATE_TYPE value5 = DELIVERY_RATE_TYPE.RATE_10000;
                string             value6 = string.Empty;
                uint value7 = 0u;
                uint value8 = 0u;
                csv_reader.PopEnum(ref value, DELIVERY_CONDITION_TYPE.NONE);
                csv_reader.Pop(ref value2);
                csv_reader.Pop(ref value3);
                if (i == 0)
                {
                    csv_reader.Pop(ref value4);
                }
                csv_reader.Pop(ref value5);
                csv_reader.Pop(ref value6);
                csv_reader.Pop(ref value7);
                csv_reader.Pop(ref value8);
                NeedData needData = new NeedData(value, value2, value3, value4, value5, value6, value7, value8);
                if (needData.IsValid())
                {
                    list.Add(needData);
                }
            }
            data.needs = list.ToArray();
            if (string.IsNullOrEmpty(data.locationNumber))
            {
                data.locationNumber = (data.id / 100u % 1000u).ToString();
            }
            if (string.IsNullOrEmpty(data.deliveryNumber))
            {
                data.deliveryNumber = (data.id % 100u).ToString();
            }
            csv_reader.Pop(ref data.regionId);
            csv_reader.Pop(ref data.appearRegionId);
            return(true);
        }