Пример #1
0
 public static bool IsInvalidClearInGame(DELIVERY_TYPE type, DIFFICULTY_MODE fieldMode)
 {
     if (type == DELIVERY_TYPE.ONCE && fieldMode == DIFFICULTY_MODE.HARD)
     {
         return(true);
     }
     return(type != DELIVERY_TYPE.ONCE && type != DELIVERY_TYPE.SUB_EVENT);
 }
Пример #2
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();
            }
        }