public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResAiParamConf.CURRVERSION < cutVer)
     {
         cutVer = ResAiParamConf.CURRVERSION;
     }
     if (ResAiParamConf.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt16(ref this.wId);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readInt32(ref this.iParam);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 2
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
     if ((cutVer == 0) || (CURRVERSION < cutVer))
     {
         cutVer = CURRVERSION;
     }
     if (BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     type = srcBuf.readUInt32(ref this.dwExpRatio);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = srcBuf.readUInt32(ref this.dwCoinRatio);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         this.TransferData();
     }
     return(type);
 }
Esempio n. 3
0
        public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || FRAME_CMD_PKG.CURRVERSION < cutVer)
            {
                cutVer = FRAME_CMD_PKG.CURRVERSION;
            }
            if (FRAME_CMD_PKG.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bCmdType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            long selector = (long)this.bCmdType;

            errorType = this.stCmdInfo.unpack(selector, ref srcBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            srcBuf.disableEndian();
            if (cutVer == 0u || ResDT_CreditRewardShowItem.CURRVERSION < cutVer)
            {
                cutVer = ResDT_CreditRewardShowItem.CURRVERSION;
            }
            if (ResDT_CreditRewardShowItem.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            int num = 32;

            if (this.szCreditRewardItemIcon_ByteArray.GetLength(0) < num)
            {
                this.szCreditRewardItemIcon_ByteArray = new byte[ResDT_CreditRewardShowItem.LENGTH_szCreditRewardItemIcon];
            }
            TdrError.ErrorType errorType = srcBuf.readCString(ref this.szCreditRewardItemIcon_ByteArray, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num2 = 64;

            if (this.szCreditRewardItemDesc_ByteArray.GetLength(0) < num2)
            {
                this.szCreditRewardItemDesc_ByteArray = new byte[ResDT_CreditRewardShowItem.LENGTH_szCreditRewardItemDesc];
            }
            errorType = srcBuf.readCString(ref this.szCreditRewardItemDesc_ByteArray, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            this.TransferData();
            return(errorType);
        }
Esempio n. 5
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResDT_GIFT_ITEMGRP_LIMIT.CURRVERSION < cutVer)
     {
         cutVer = ResDT_GIFT_ITEMGRP_LIMIT.CURRVERSION;
     }
     if (ResDT_GIFT_ITEMGRP_LIMIT.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt16(ref this.wItemType);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwItemID);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResDT_APRefresh_Info.CURRVERSION < cutVer)
     {
         cutVer = ResDT_APRefresh_Info.CURRVERSION;
     }
     if (ResDT_APRefresh_Info.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwAPAddUp);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt16(ref this.wRefreshRate);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
        public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || CSPKG_CLT_ACTION_STATISTICS.CURRVERSION < cutVer)
            {
                cutVer = CSPKG_CLT_ACTION_STATISTICS.CURRVERSION;
            }
            if (CSPKG_CLT_ACTION_STATISTICS.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bActionType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            long selector = (long)this.bActionType;

            errorType = this.stActionData.unpack(selector, ref srcBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
 public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     if (cutVer == 0u || COMDT_ACNT_PASSWD_INFO.CURRVERSION < cutVer)
     {
         cutVer = COMDT_ACNT_PASSWD_INFO.CURRVERSION;
     }
     if (COMDT_ACNT_PASSWD_INFO.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType;
     for (int i = 0; i < 64; i++)
     {
         errorType = srcBuf.readInt8(ref this.szPswdStrInfo[i]);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     errorType = srcBuf.readUInt8(ref this.bPswdState);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwPswdCloseTime);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt8(ref this.bPswdCloseState);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     return(errorType);
 }
 public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     if (cutVer == 0u || CSPKG_CREATEULTIGAMEREQ.CURRVERSION < cutVer)
     {
         cutVer = CSPKG_CREATEULTIGAMEREQ.CURRVERSION;
     }
     if (CSPKG_CREATEULTIGAMEREQ.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType;
     for (int i = 0; i < 64; i++)
     {
         errorType = srcBuf.readInt8(ref this.szRoomName[i]);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     errorType = srcBuf.readUInt8(ref this.bGameMode);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt8(ref this.bMapType);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwMapId);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     return(errorType);
 }
Esempio n. 10
0
 public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     if (cutVer == 0u || ResFreeHero.CURRVERSION < cutVer)
     {
         cutVer = ResFreeHero.CURRVERSION;
     }
     if (ResFreeHero.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwLvlLow);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt8(ref this.bIgnoreLimitedFree);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwHeroNum);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     for (int i = 0; i < 10; i++)
     {
         errorType = srcBuf.readUInt32(ref this.HeroID[i]);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 11
0
 public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     if (cutVer == 0u || ResDT_AntiCheatFormulaParam.CURRVERSION < cutVer)
     {
         cutVer = ResDT_AntiCheatFormulaParam.CURRVERSION;
     }
     if (ResDT_AntiCheatFormulaParam.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwKeyType);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwCoefficientTTH);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwOperator);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     for (int i = 0; i < 4; i++)
     {
         errorType = srcBuf.readInt32(ref this.KeyDetail[i]);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 12
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResDT_DateTime.CURRVERSION < cutVer)
     {
         cutVer = ResDT_DateTime.CURRVERSION;
     }
     if (ResDT_DateTime.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt64(ref this.ullStartTime);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt64(ref this.ullEndTime);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResRankWarmBattleTrigger.CURRVERSION < cutVer)
     {
         cutVer = ResRankWarmBattleTrigger.CURRVERSION;
     }
     if (ResRankWarmBattleTrigger.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bSmallGrade);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwScore);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 14
0
        public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || SCPKG_FIGHTHISTORYLIST_RSP.CURRVERSION < cutVer)
            {
                cutVer = SCPKG_FIGHTHISTORYLIST_RSP.CURRVERSION;
            }
            if (SCPKG_FIGHTHISTORYLIST_RSP.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bErrorCode);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            long selector = (long)this.bErrorCode;

            errorType = this.stRecordDetail.unpack(selector, ref srcBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
Esempio n. 15
0
        public TdrError.ErrorType unpack(long selector, ref TdrReadBuf srcBuf, uint cutVer)
        {
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            ProtocolObject     obj2 = this.select(selector);

            if (obj2 != null)
            {
                return(obj2.unpack(ref srcBuf, cutVer));
            }
            type = srcBuf.readInt8(ref this.chReserve);
            if (type != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(type);
            }
            return(type);
        }
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResDT_RankFakeHeroInfo.CURRVERSION < cutVer)
     {
         cutVer = ResDT_RankFakeHeroInfo.CURRVERSION;
     }
     if (ResDT_RankFakeHeroInfo.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwHeroID);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwSkinID);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 17
0
        public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || CSDT_RECONN_ADJUST_STATE_EXTRA.CURRVERSION < cutVer)
            {
                cutVer = CSDT_RECONN_ADJUST_STATE_EXTRA.CURRVERSION;
            }
            if (CSDT_RECONN_ADJUST_STATE_EXTRA.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bPickType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            long selector = (long)this.bPickType;

            errorType = this.stPickDetail.unpack(selector, ref srcBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
Esempio n. 18
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResDT_IntParamArryGrowNode.CURRVERSION < cutVer)
     {
         cutVer = ResDT_IntParamArryGrowNode.CURRVERSION;
     }
     if (ResDT_IntParamArryGrowNode.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readFloat(ref this.fGrowParam);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readFloat(ref this.fEnergyEffect);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 19
0
 public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     if (cutVer == 0u || ResDT_BPItem.CURRVERSION < cutVer)
     {
         cutVer = ResDT_BPItem.CURRVERSION;
     }
     if (ResDT_BPItem.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bCamp);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt8(ref this.bPosNum);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     for (int i = 0; i < 2; i++)
     {
         errorType = srcBuf.readUInt8(ref this.szPosList_ByteArray[i]);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     errorType = srcBuf.readUInt32(ref this.dwTimeout);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 20
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResKNPriority.CURRVERSION < cutVer)
     {
         cutVer = ResKNPriority.CURRVERSION;
     }
     if (ResKNPriority.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwKNValue);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt8(ref this.bPriority);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 21
0
 public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
     if ((cutVer == 0) || (CURRVERSION < cutVer))
     {
         cutVer = CURRVERSION;
     }
     if (BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     type = srcBuf.readUInt32(ref this.dwLevelID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = srcBuf.readUInt32(ref this.dwGoldCnt);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwSkillPoint);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         for (int i = 0; i < 5; i++)
         {
             type = srcBuf.readInt32(ref this.SkillCombatEft[i]);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         this.TransferData();
     }
     return(type);
 }
Esempio n. 22
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResDT_LuckyDrawExternReward.CURRVERSION < cutVer)
     {
         cutVer = ResDT_LuckyDrawExternReward.CURRVERSION;
     }
     if (ResDT_LuckyDrawExternReward.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwDrawCnt);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwRewardID);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Esempio n. 23
0
        public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || CSPkg.CURRVERSION < cutVer)
            {
                cutVer = CSPkg.CURRVERSION;
            }
            if (CSPkg.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = this.stPkgHead.unpack(ref srcBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            long selector = (long)((ulong)this.stPkgHead.dwMsgID);

            errorType = this.stPkgData.unpack(selector, ref srcBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
 public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
     if ((cutVer == 0) || (CURRVERSION < cutVer))
     {
         cutVer = CURRVERSION;
     }
     if (BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     type = srcBuf.readUInt32(ref this.dwGuildHeadID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         uint dest = 0;
         type = srcBuf.readUInt32(ref dest);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (dest > srcBuf.getLeftSize())
         {
             return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
         }
         if (dest > this.szGuildName.GetLength(0))
         {
             if (dest > LENGTH_szGuildName)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szGuildName = new byte[dest];
         }
         if (1 > dest)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szGuildName, (int)dest);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (this.szGuildName[((int)dest) - 1] != 0)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         int num2 = TdrTypeUtil.cstrlen(this.szGuildName) + 1;
         if (dest != num2)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         type = srcBuf.readUInt8(ref this.bGuildLevel);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bMemberNum);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwChairManHeadID);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         uint num3 = 0;
         type = srcBuf.readUInt32(ref num3);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (num3 > srcBuf.getLeftSize())
         {
             return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
         }
         if (num3 > this.szChairManHeadUrl.GetLength(0))
         {
             if (num3 > LENGTH_szChairManHeadUrl)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szChairManHeadUrl = new byte[num3];
         }
         if (1 > num3)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szChairManHeadUrl, (int)num3);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (this.szChairManHeadUrl[((int)num3) - 1] != 0)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         int num4 = TdrTypeUtil.cstrlen(this.szChairManHeadUrl) + 1;
         if (num3 != num4)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         uint num5 = 0;
         type = srcBuf.readUInt32(ref num5);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (num5 > srcBuf.getLeftSize())
         {
             return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
         }
         if (num5 > this.szChairManName.GetLength(0))
         {
             if (num5 > LENGTH_szChairManName)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szChairManName = new byte[num5];
         }
         if (1 > num5)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szChairManName, (int)num5);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (this.szChairManName[((int)num5) - 1] != 0)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         int num6 = TdrTypeUtil.cstrlen(this.szChairManName) + 1;
         if (num5 != num6)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         type = srcBuf.readUInt32(ref this.dwChairManLv);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         uint num7 = 0;
         type = srcBuf.readUInt32(ref num7);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (num7 > srcBuf.getLeftSize())
         {
             return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
         }
         if (num7 > this.szGuildNotice.GetLength(0))
         {
             if (num7 > LENGTH_szGuildNotice)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szGuildNotice = new byte[num7];
         }
         if (1 > num7)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szGuildNotice, (int)num7);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (this.szGuildNotice[((int)num7) - 1] != 0)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         int num8 = TdrTypeUtil.cstrlen(this.szGuildNotice) + 1;
         if (num7 != num8)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         if (VERSION_stChairManVip <= cutVer)
         {
             type = this.stChairManVip.unpack(ref srcBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         else
         {
             type = this.stChairManVip.construct();
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         if (VERSION_dwStar <= cutVer)
         {
             type = srcBuf.readUInt32(ref this.dwStar);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         else
         {
             this.dwStar = 0;
         }
         if (VERSION_dwTotalRankPoint <= cutVer)
         {
             type = srcBuf.readUInt32(ref this.dwTotalRankPoint);
             if (type == TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             return(type);
         }
         this.dwTotalRankPoint = 0;
     }
     return(type);
 }
Esempio n. 25
0
 public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
     if ((cutVer == 0) || (CURRVERSION < cutVer))
     {
         cutVer = CURRVERSION;
     }
     if (BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     type = srcBuf.readInt32(ref this.iActId);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         uint dest = 0;
         type = srcBuf.readUInt32(ref dest);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (dest > srcBuf.getLeftSize())
         {
             return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
         }
         if (dest > this.szGainChestId.GetLength(0))
         {
             if (dest > LENGTH_szGainChestId)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szGainChestId = new byte[dest];
         }
         if (1 > dest)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szGainChestId, (int)dest);
         if (type == TdrError.ErrorType.TDR_NO_ERROR)
         {
             if (this.szGainChestId[((int)dest) - 1] != 0)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
             }
             int num2 = TdrTypeUtil.cstrlen(this.szGainChestId) + 1;
             if (dest != num2)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
             }
             type = srcBuf.readUInt16(ref this.wTitleLen);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             if (0x80 < this.wTitleLen)
             {
                 return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
             }
             this.szChestTitle = new sbyte[this.wTitleLen];
             for (int i = 0; i < this.wTitleLen; i++)
             {
                 type = srcBuf.readInt8(ref this.szChestTitle[i]);
                 if (type != TdrError.ErrorType.TDR_NO_ERROR)
                 {
                     return(type);
                 }
             }
             type = srcBuf.readUInt16(ref this.wContentLen);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             if (0x100 < this.wContentLen)
             {
                 return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
             }
             this.szChestContent = new sbyte[this.wContentLen];
             for (int j = 0; j < this.wContentLen; j++)
             {
                 type = srcBuf.readInt8(ref this.szChestContent[j]);
                 if (type != TdrError.ErrorType.TDR_NO_ERROR)
                 {
                     return(type);
                 }
             }
             type = srcBuf.readInt32(ref this.iResult);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
     }
     return(type);
 }
Esempio n. 26
0
        public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            uint dest = 0;

            type = srcBuf.readUInt32(ref dest);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                if (dest > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (dest > this.szTitle_ByteArray.GetLength(0))
                {
                    if (dest > LENGTH_szTitle)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szTitle_ByteArray = new byte[dest];
                }
                if (1 > dest)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szTitle_ByteArray, (int)dest);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szTitle_ByteArray[((int)dest) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num2 = TdrTypeUtil.cstrlen(this.szTitle_ByteArray) + 1;
                if (dest != num2)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                type = srcBuf.readUInt8(ref this.bLevel);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwTopPoint);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                uint num3 = 0;
                type = srcBuf.readUInt32(ref num3);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num3 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num3 > this.szImagePath_ByteArray.GetLength(0))
                {
                    if (num3 > LENGTH_szImagePath)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szImagePath_ByteArray = new byte[num3];
                }
                if (1 > num3)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szImagePath_ByteArray, (int)num3);
                if (type == TdrError.ErrorType.TDR_NO_ERROR)
                {
                    if (this.szImagePath_ByteArray[((int)num3) - 1] != 0)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    int num4 = TdrTypeUtil.cstrlen(this.szImagePath_ByteArray) + 1;
                    if (num3 != num4)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    type = srcBuf.readUInt8(ref this.bJob);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    this.TransferData();
                }
            }
            return(type);
        }
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            srcBuf.disableEndian();
            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            int count = 0x20;

            if (this.szName_ByteArray.GetLength(0) < count)
            {
                this.szName_ByteArray = new byte[LENGTH_szName];
            }
            type = srcBuf.readCString(ref this.szName_ByteArray, count);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int num2 = 0x20;
                if (this.szDesignFileName_ByteArray.GetLength(0) < num2)
                {
                    this.szDesignFileName_ByteArray = new byte[LENGTH_szDesignFileName];
                }
                type = srcBuf.readCString(ref this.szDesignFileName_ByteArray, num2);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num3 = 0x20;
                if (this.szArtistFileName_ByteArray.GetLength(0) < num3)
                {
                    this.szArtistFileName_ByteArray = new byte[LENGTH_szArtistFileName];
                }
                type = srcBuf.readCString(ref this.szArtistFileName_ByteArray, num3);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bMaxAcntNum);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bValidRoomType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bHeroNum);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bIsAllowHeroDup);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHeroFormId);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iHeroAIType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num4 = 0x80;
                if (this.szThumbnailPath_ByteArray.GetLength(0) < num4)
                {
                    this.szThumbnailPath_ByteArray = new byte[LENGTH_szThumbnailPath];
                }
                type = srcBuf.readCString(ref this.szThumbnailPath_ByteArray, num4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num5 = 0x80;
                if (this.szMapPath_ByteArray.GetLength(0) < num5)
                {
                    this.szMapPath_ByteArray = new byte[LENGTH_szMapPath];
                }
                type = srcBuf.readCString(ref this.szMapPath_ByteArray, num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num6 = 0x80;
                if (this.szBigMapPath_ByteArray.GetLength(0) < num6)
                {
                    this.szBigMapPath_ByteArray = new byte[LENGTH_szBigMapPath];
                }
                type = srcBuf.readCString(ref this.szBigMapPath_ByteArray, num6);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iMapWidth);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iMapHeight);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iBigMapWidth);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iBigMapHeight);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwSoulID);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bIsOpenExpCompensate);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                for (int i = 0; i < 5; i++)
                {
                    type = this.astExpCompensateDetail[i].load(ref srcBuf, cutVer);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                type = srcBuf.readInt32(ref this.iExtraSkillId);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iExtraSkill2Id);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iExtraPassiveSkillId);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bFinResultType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bRandPickHero);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwAddWinCondStarId);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwAddLoseCondStarId);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwTimeDuration);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwSoulAllocId);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bCameraFlip);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iSoldierActivateCountDelay1);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iSoldierActivateCountDelay2);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iSoldierActivateDelay);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bBattleEquipLimit);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bBirthLevelConfig);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bChaosPickRule);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bHeadPtsUpperLimit);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bSrvLeastDestoryTowerNum);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bSrvLeastDestoryBaseNum);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bSrvLeastKillCntNum);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bDealHangUp);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwUnLockCondID);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                this.TransferData();
            }
            return(type);
        }
        public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            uint dest = 0;

            type = srcBuf.readUInt32(ref dest);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                if (dest > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (dest > this.szName_ByteArray.GetLength(0))
                {
                    if (dest > LENGTH_szName)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szName_ByteArray = new byte[dest];
                }
                if (1 > dest)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szName_ByteArray, (int)dest);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szName_ByteArray[((int)dest) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num2 = TdrTypeUtil.cstrlen(this.szName_ByteArray) + 1;
                if (dest != num2)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num3 = 0;
                type = srcBuf.readUInt32(ref num3);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num3 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num3 > this.szDesignFileName_ByteArray.GetLength(0))
                {
                    if (num3 > LENGTH_szDesignFileName)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szDesignFileName_ByteArray = new byte[num3];
                }
                if (1 > num3)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szDesignFileName_ByteArray, (int)num3);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szDesignFileName_ByteArray[((int)num3) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num4 = TdrTypeUtil.cstrlen(this.szDesignFileName_ByteArray) + 1;
                if (num3 != num4)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num5 = 0;
                type = srcBuf.readUInt32(ref num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num5 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num5 > this.szArtistFileName_ByteArray.GetLength(0))
                {
                    if (num5 > LENGTH_szArtistFileName)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szArtistFileName_ByteArray = new byte[num5];
                }
                if (1 > num5)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szArtistFileName_ByteArray, (int)num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szArtistFileName_ByteArray[((int)num5) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num6 = TdrTypeUtil.cstrlen(this.szArtistFileName_ByteArray) + 1;
                if (num5 != num6)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                type = srcBuf.readUInt8(ref this.bMaxAcntNum);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bValidRoomType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bHeroNum);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bIsAllowHeroDup);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHeroFormId);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iHeroAIType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                uint num7 = 0;
                type = srcBuf.readUInt32(ref num7);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num7 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num7 > this.szThumbnailPath_ByteArray.GetLength(0))
                {
                    if (num7 > LENGTH_szThumbnailPath)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szThumbnailPath_ByteArray = new byte[num7];
                }
                if (1 > num7)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szThumbnailPath_ByteArray, (int)num7);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szThumbnailPath_ByteArray[((int)num7) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num8 = TdrTypeUtil.cstrlen(this.szThumbnailPath_ByteArray) + 1;
                if (num7 != num8)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num9 = 0;
                type = srcBuf.readUInt32(ref num9);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num9 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num9 > this.szMapPath_ByteArray.GetLength(0))
                {
                    if (num9 > LENGTH_szMapPath)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szMapPath_ByteArray = new byte[num9];
                }
                if (1 > num9)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szMapPath_ByteArray, (int)num9);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szMapPath_ByteArray[((int)num9) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num10 = TdrTypeUtil.cstrlen(this.szMapPath_ByteArray) + 1;
                if (num9 != num10)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num11 = 0;
                type = srcBuf.readUInt32(ref num11);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num11 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num11 > this.szBigMapPath_ByteArray.GetLength(0))
                {
                    if (num11 > LENGTH_szBigMapPath)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szBigMapPath_ByteArray = new byte[num11];
                }
                if (1 > num11)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szBigMapPath_ByteArray, (int)num11);
                if (type == TdrError.ErrorType.TDR_NO_ERROR)
                {
                    if (this.szBigMapPath_ByteArray[((int)num11) - 1] != 0)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    int num12 = TdrTypeUtil.cstrlen(this.szBigMapPath_ByteArray) + 1;
                    if (num11 != num12)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    type = srcBuf.readInt32(ref this.iMapWidth);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iMapHeight);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iBigMapWidth);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iBigMapHeight);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwSoulID);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bIsOpenExpCompensate);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    for (int i = 0; i < 5; i++)
                    {
                        type = this.astExpCompensateDetail[i].unpack(ref srcBuf, cutVer);
                        if (type != TdrError.ErrorType.TDR_NO_ERROR)
                        {
                            return(type);
                        }
                    }
                    type = srcBuf.readInt32(ref this.iExtraSkillId);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iExtraSkill2Id);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iExtraPassiveSkillId);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bFinResultType);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bRandPickHero);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwAddWinCondStarId);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwAddLoseCondStarId);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwTimeDuration);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwSoulAllocId);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bCameraFlip);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iSoldierActivateCountDelay1);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iSoldierActivateCountDelay2);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iSoldierActivateDelay);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bBattleEquipLimit);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bBirthLevelConfig);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bChaosPickRule);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bHeadPtsUpperLimit);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bSrvLeastDestoryTowerNum);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bSrvLeastDestoryBaseNum);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bSrvLeastKillCntNum);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bDealHangUp);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwUnLockCondID);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    this.TransferData();
                }
            }
            return(type);
        }
Esempio n. 29
0
        public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || CSDT_GUILDMATCH_SIGNUPINFO.CURRVERSION < cutVer)
            {
                cutVer = CSDT_GUILDMATCH_SIGNUPINFO.CURRVERSION;
            }
            if (CSDT_GUILDMATCH_SIGNUPINFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt64(ref this.ullUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bPos1);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bPos2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint num = 0u;

            errorType = srcBuf.readUInt32(ref num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (num > (uint)srcBuf.getLeftSize())
            {
                return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
            }
            if (num > (uint)this.szBeiZhu.GetLength(0))
            {
                if ((ulong)num > (ulong)CSDT_GUILDMATCH_SIGNUPINFO.LENGTH_szBeiZhu)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szBeiZhu = new byte[num];
            }
            if (1u > num)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szBeiZhu, (int)num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szBeiZhu[(int)(num - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num2 = TdrTypeUtil.cstrlen(this.szBeiZhu) + 1;

            if ((ulong)num != (ulong)((long)num2))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt8(ref this.bHeroNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (3 < this.bHeroNum)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            for (int i = 0; i < (int)this.bHeroNum; i++)
            {
                errorType = this.astHeroInfo[i].unpack(ref srcBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            return(errorType);
        }
        public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_MULTIGAME_MEMBER_BRIEF_INFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_MULTIGAME_MEMBER_BRIEF_INFO.CURRVERSION;
            }
            if (COMDT_MULTIGAME_MEMBER_BRIEF_INFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            uint num = 0u;

            TdrError.ErrorType errorType = srcBuf.readUInt32(ref num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (num > (uint)srcBuf.getLeftSize())
            {
                return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
            }
            if (num > (uint)this.szAcntOpenID.GetLength(0))
            {
                if ((ulong)num > (ulong)COMDT_MULTIGAME_MEMBER_BRIEF_INFO.LENGTH_szAcntOpenID)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szAcntOpenID = new byte[num];
            }
            if (1u > num)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szAcntOpenID, (int)num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szAcntOpenID[(int)(num - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num2 = TdrTypeUtil.cstrlen(this.szAcntOpenID) + 1;

            if ((ulong)num != (ulong)((long)num2))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt64(ref this.ullAcntUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readInt32(ref this.iAcntLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint num3 = 0u;

            errorType = srcBuf.readUInt32(ref num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (num3 > (uint)srcBuf.getLeftSize())
            {
                return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
            }
            if (num3 > (uint)this.szAcntName.GetLength(0))
            {
                if ((ulong)num3 > (ulong)COMDT_MULTIGAME_MEMBER_BRIEF_INFO.LENGTH_szAcntName)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szAcntName = new byte[num3];
            }
            if (1u > num3)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szAcntName, (int)num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szAcntName[(int)(num3 - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num4 = TdrTypeUtil.cstrlen(this.szAcntName) + 1;

            if ((ulong)num3 != (ulong)((long)num4))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt8(ref this.bAcntCamp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bBeComplainted);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bGradeOfRank);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwKillCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwDeadCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwAssistCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwNoAIKillCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwNoAIDeadCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwNoAIAssistCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwTotalHurtHeroCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwTotalBeHurtCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwTotalInBattleCoin);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwHangupRatio);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint num5 = 0u;

            errorType = srcBuf.readUInt32(ref num5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (num5 > (uint)srcBuf.getLeftSize())
            {
                return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
            }
            if (num5 > (uint)this.szCodeName.GetLength(0))
            {
                if ((ulong)num5 > (ulong)COMDT_MULTIGAME_MEMBER_BRIEF_INFO.LENGTH_szCodeName)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szCodeName = new byte[num5];
            }
            if (1u > num5)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szCodeName, (int)num5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szCodeName[(int)(num5 - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num6 = TdrTypeUtil.cstrlen(this.szCodeName) + 1;

            if ((ulong)num5 != (ulong)((long)num6))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readInt32(ref this.iMVPScore);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMatchMMR);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMasterLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt64(ref this.ullMasterUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMasterLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwBattleHeroId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }