public void LoadFromBinary(BinaryTableReader reader, ref uint key1, ref uint key2)
        {
            id       = key1;
            lv       = key2;
            atk      = new GrowRate();
            atk.rate = reader.ReadInt32(0);
            atk.add  = reader.ReadInt32(0);
            def      = new GrowRate();
            def.rate = reader.ReadInt32(0);
            def.add  = reader.ReadInt32(0);
            hp       = new GrowRate();
            hp.rate  = reader.ReadInt32(0);
            hp.add   = reader.ReadInt32(0);
            elemAtk  = new GrowRate[6];
            int i = 0;

            for (int num = 6; i < num; i++)
            {
                elemAtk[i]      = new GrowRate();
                elemAtk[i].rate = reader.ReadInt32(0);
                elemAtk[i].add  = reader.ReadInt32(0);
            }
            elemDef = new GrowRate[6];
            int j = 0;

            for (int num2 = 6; j < num2; j++)
            {
                elemDef[j]      = new GrowRate();
                elemDef[j].rate = reader.ReadInt32(0);
                elemDef[j].add  = reader.ReadInt32(0);
            }
        }
 public void LoadFromBinary(BinaryTableReader reader, ref uint key1, ref uint key2)
 {
     id          = key1;
     this.key2   = key2;
     needAP      = reader.ReadInt32(0);
     name        = reader.ReadString(string.Empty);
     description = reader.ReadString(string.Empty);
     m_info      = new AbilityInfo[3];
     for (int i = 0; i < 3; i++)
     {
         AbilityInfo abilityInfo = new AbilityInfo();
         abilityInfo.type   = (ABILITY_TYPE)reader.ReadInt32(0);
         abilityInfo.target = reader.ReadString(string.Empty);
         abilityInfo.value  = reader.ReadInt32(0);
         m_info[i]          = abilityInfo;
     }
 }
 public void LoadFromBinary(BinaryTableReader reader, ref uint key1, ref uint key2)
 {
     id = key1;
     lv = key2;
     need_material.Clear();
     for (int i = 0; i < NEED_MATERIAL_LENGTH_MAX; i++)
     {
         uint num  = reader.ReadUInt32(0u);
         int  num2 = reader.ReadInt32(0);
         if (num != 0 && num2 != 0)
         {
             need_material.Add(new NeedMaterial(num, num2));
         }
     }
     needMaterial = need_material.ToArray();
     needMoney    = reader.ReadInt32(0);
 }
 public void LoadFromBinary(BinaryTableReader reader, ref uint key)
 {
     questID          = key;
     questType        = (QUEST_TYPE)reader.ReadInt32(0);
     questStyle       = (QUEST_STYLE)reader.ReadInt32(0);
     rarity           = (RARITY_TYPE)reader.ReadInt32(0);
     getType          = (GET_TYPE)reader.ReadInt32(0);
     eventId          = reader.ReadInt32(0);
     grade            = reader.ReadInt32(0);
     difficulty       = (DIFFICULTY_TYPE)reader.ReadInt32(0);
     sortPriority     = reader.ReadInt32(0);
     locationNumber   = reader.ReadString(string.Empty);
     questNumber      = reader.ReadString(string.Empty);
     questText        = reader.ReadString(string.Empty);
     appearQuestId    = reader.ReadUInt32(0u);
     appearDeliveryId = reader.ReadUInt32(0u);
     rushId           = reader.ReadUInt32(0u);
     mapId            = reader.ReadUInt32(0u);
     for (int i = 0; i < 1; i++)
     {
         stageName[i] = reader.ReadString(string.Empty);
     }
     for (int j = 0; j < 1; j++)
     {
         enemyID[j] = reader.ReadInt32(0);
         enemyLv[j] = reader.ReadInt32(0);
     }
     for (int k = 0; k < 1; k++)
     {
         bgmID[k] = reader.ReadInt32(0);
     }
     limitTime    = reader.ReadSingle(0f);
     missionID[0] = reader.ReadUInt32(0u);
     missionID[1] = reader.ReadUInt32(0u);
     missionID[2] = reader.ReadUInt32(0u);
     cantSale     = reader.ReadBoolean(false);
     forceDefeat  = reader.ReadBoolean(false);
     storyId      = reader.ReadInt32(0);
     if (sortPriority == 0)
     {
         sortPriority = (int)key;
     }
     if (string.IsNullOrEmpty(locationNumber))
     {
         locationNumber = (questID / 100u % 1000u).ToString();
     }
     if (string.IsNullOrEmpty(questNumber))
     {
         questNumber = (questID % 100u).ToString();
     }
     seriesNum = 0;
     for (int l = 0; l < 1 && enemyID[l] != 0; l++)
     {
         seriesNum++;
     }
 }
Example #5
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();
            }
        }