Beispiel #1
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.readUInt8(ref this.bID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = srcBuf.readInt32(ref this.iGradeDiff);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readFloat(ref this.fAddScoreFactor);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readFloat(ref this.fDecScoreFactor);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readInt32(ref this.iAdjustMMR);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         this.TransferData();
     }
     return(type);
 }
Beispiel #2
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResRankGradeAdjustConf.CURRVERSION < cutVer)
     {
         cutVer = ResRankGradeAdjustConf.CURRVERSION;
     }
     if (ResRankGradeAdjustConf.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bID);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readInt32(ref this.iGradeDiff);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readFloat(ref this.fAddScoreFactor);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readFloat(ref this.fDecScoreFactor);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readInt32(ref this.iAdjustMMR);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Beispiel #3
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.dwRankStart);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = srcBuf.readUInt32(ref this.dwRankEnd);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readFloat(ref this.fRewardCoinFactor);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readFloat(ref this.fRewardDiamondFactor);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readFloat(ref this.fRewardArenaCoinFactor);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         this.TransferData();
     }
     return(type);
 }
Beispiel #4
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResArenaOneTimeReward.CURRVERSION < cutVer)
     {
         cutVer = ResArenaOneTimeReward.CURRVERSION;
     }
     if (ResArenaOneTimeReward.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwRankStart);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readUInt32(ref this.dwRankEnd);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readFloat(ref this.fRewardCoinFactor);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readFloat(ref this.fRewardDiamondFactor);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     errorType = srcBuf.readFloat(ref this.fRewardArenaCoinFactor);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
 public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
 {
     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);
 }
Beispiel #6
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.readFloat(ref this.fGrowParam);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = srcBuf.readFloat(ref this.fEnergyEffect);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         this.TransferData();
     }
     return(type);
 }
Beispiel #7
0
 public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
 {
     srcBuf.disableEndian();
     if (cutVer == 0u || ResDT_FloatParamArrayNode.CURRVERSION < cutVer)
     {
         cutVer = ResDT_FloatParamArrayNode.CURRVERSION;
     }
     if (ResDT_FloatParamArrayNode.BASEVERSION > cutVer)
     {
         return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
     }
     TdrError.ErrorType errorType = srcBuf.readFloat(ref this.fParam);
     if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
     {
         return(errorType);
     }
     this.TransferData();
     return(errorType);
 }
Beispiel #8
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.readFloat(ref this.fParam);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         this.TransferData();
     }
     return(type);
 }
Beispiel #9
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.dwId);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = srcBuf.readUInt32(ref this.dwSpecSaleType);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwSpecSaleId);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bCostType);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readFloat(ref this.fDiscount);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int count = 0x10;
         if (this.szOnTime_ByteArray.GetLength(0) < count)
         {
             this.szOnTime_ByteArray = new byte[LENGTH_szOnTime];
         }
         type = srcBuf.readCString(ref this.szOnTime_ByteArray, count);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num2 = 0x10;
         if (this.szOffTime_ByteArray.GetLength(0) < num2)
         {
             this.szOffTime_ByteArray = new byte[LENGTH_szOffTime];
         }
         type = srcBuf.readCString(ref this.szOffTime_ByteArray, num2);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwStartVIPLvl);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwEndVIPLvl);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwPurchaseCycle);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwBuyLimitNum);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readInt32(ref this.iRecommend);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwOnTimeGen);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwOffTimeGen);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bShowLimitBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bTag);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwDiscountForDisplay);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         this.TransferData();
     }
     return(type);
 }
Beispiel #10
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.dwId);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = srcBuf.readUInt32(ref this.dwSpecSaleType);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwSpecSaleId);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bCostType);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readFloat(ref this.fDiscount);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         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.szOnTime_ByteArray.GetLength(0))
         {
             if (dest > LENGTH_szOnTime)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szOnTime_ByteArray = new byte[dest];
         }
         if (1 > dest)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szOnTime_ByteArray, (int)dest);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (this.szOnTime_ByteArray[((int)dest) - 1] != 0)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         int num2 = TdrTypeUtil.cstrlen(this.szOnTime_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.szOffTime_ByteArray.GetLength(0))
         {
             if (num3 > LENGTH_szOffTime)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szOffTime_ByteArray = new byte[num3];
         }
         if (1 > num3)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szOffTime_ByteArray, (int)num3);
         if (type == TdrError.ErrorType.TDR_NO_ERROR)
         {
             if (this.szOffTime_ByteArray[((int)num3) - 1] != 0)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
             }
             int num4 = TdrTypeUtil.cstrlen(this.szOffTime_ByteArray) + 1;
             if (num3 != num4)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
             }
             type = srcBuf.readUInt32(ref this.dwStartVIPLvl);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwEndVIPLvl);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwPurchaseCycle);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwBuyLimitNum);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readInt32(ref this.iRecommend);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwOnTimeGen);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwOffTimeGen);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bShowLimitBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bTag);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwDiscountForDisplay);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             this.TransferData();
         }
     }
     return(type);
 }
Beispiel #11
0
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            srcBuf.disableEndian();
            if (cutVer == 0u || ResPropInfo.CURRVERSION < cutVer)
            {
                cutVer = ResPropInfo.CURRVERSION;
            }
            if (ResPropInfo.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num = 64;

            if (this.szName_ByteArray.GetLength(0) < num)
            {
                this.szName_ByteArray = new byte[ResPropInfo.LENGTH_szName];
            }
            errorType = srcBuf.readCString(ref this.szName_ByteArray, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsView);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num2 = 256;

            if (this.szDesc_ByteArray.GetLength(0) < num2)
            {
                this.szDesc_ByteArray = new byte[ResPropInfo.LENGTH_szDesc];
            }
            errorType = srcBuf.readCString(ref this.szDesc_ByteArray, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num3 = 256;

            if (this.szDescAdd_ByteArray.GetLength(0) < num3)
            {
                this.szDescAdd_ByteArray = new byte[ResPropInfo.LENGTH_szDescAdd];
            }
            errorType = srcBuf.readCString(ref this.szDescAdd_ByteArray, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwIcon);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bGrade);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bClass);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readInt32(ref this.iUseShowTip);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readInt32(ref this.iOverLimit);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCouponsBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwPVPCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwBurningCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwArenaCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwGuildCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwDiamondBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsBuyMixPay);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsCanUse);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsAutoSale);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsSale);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCoinSale);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsBatchUse);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt16(ref this.wBatchUseCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwUseGetDiamond);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwRedDot);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCouponsDirectBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsSpecGift);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt64(ref this.ullInvalidTime);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            for (int i = 0; i < 5; i++)
            {
                errorType = srcBuf.readFloat(ref this.EftParam[i]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            for (int j = 0; j < 10; j++)
            {
                errorType = this.astSrcInfo[j].load(ref srcBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            this.TransferData();
            return(errorType);
        }
Beispiel #12
0
        public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || ResPropInfo.CURRVERSION < cutVer)
            {
                cutVer = ResPropInfo.CURRVERSION;
            }
            if (ResPropInfo.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwID);
            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.szName_ByteArray.GetLength(0))
            {
                if ((long)num > (long)((ulong)ResPropInfo.LENGTH_szName))
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szName_ByteArray = new byte[num];
            }
            if (1u > num)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szName_ByteArray, (int)num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szName_ByteArray[(int)(num - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num2 = TdrTypeUtil.cstrlen(this.szName_ByteArray) + 1;

            if ((ulong)num != (ulong)((long)num2))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt8(ref this.bIsView);
            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.szDesc_ByteArray.GetLength(0))
            {
                if ((long)num3 > (long)((ulong)ResPropInfo.LENGTH_szDesc))
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szDesc_ByteArray = new byte[num3];
            }
            if (1u > num3)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szDesc_ByteArray, (int)num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szDesc_ByteArray[(int)(num3 - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num4 = TdrTypeUtil.cstrlen(this.szDesc_ByteArray) + 1;

            if ((ulong)num3 != (ulong)((long)num4))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            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.szDescAdd_ByteArray.GetLength(0))
            {
                if ((long)num5 > (long)((ulong)ResPropInfo.LENGTH_szDescAdd))
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szDescAdd_ByteArray = new byte[num5];
            }
            if (1u > num5)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szDescAdd_ByteArray, (int)num5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szDescAdd_ByteArray[(int)(num5 - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num6 = TdrTypeUtil.cstrlen(this.szDescAdd_ByteArray) + 1;

            if ((ulong)num5 != (ulong)((long)num6))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt32(ref this.dwIcon);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bGrade);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bClass);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readInt32(ref this.iUseShowTip);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readInt32(ref this.iOverLimit);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCouponsBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwPVPCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwBurningCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwArenaCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwGuildCoinBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwDiamondBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsBuyMixPay);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsCanUse);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsAutoSale);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsSale);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCoinSale);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsBatchUse);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt16(ref this.wBatchUseCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwUseGetDiamond);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwRedDot);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCouponsDirectBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsSpecGift);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt64(ref this.ullInvalidTime);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            for (int i = 0; i < 5; i++)
            {
                errorType = srcBuf.readFloat(ref this.EftParam[i]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            for (int j = 0; j < 10; j++)
            {
                errorType = this.astSrcInfo[j].unpack(ref srcBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            this.TransferData();
            return(errorType);
        }
Beispiel #13
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.dwID);
     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.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);
         }
         type = srcBuf.readUInt8(ref this.bIsView);
         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.szDesc_ByteArray.GetLength(0))
         {
             if (num3 > LENGTH_szDesc)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szDesc_ByteArray = new byte[num3];
         }
         if (1 > num3)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szDesc_ByteArray, (int)num3);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (this.szDesc_ByteArray[((int)num3) - 1] != 0)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
         }
         int num4 = TdrTypeUtil.cstrlen(this.szDesc_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.szDescAdd_ByteArray.GetLength(0))
         {
             if (num5 > LENGTH_szDescAdd)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
             }
             this.szDescAdd_ByteArray = new byte[num5];
         }
         if (1 > num5)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
         }
         type = srcBuf.readCString(ref this.szDescAdd_ByteArray, (int)num5);
         if (type == TdrError.ErrorType.TDR_NO_ERROR)
         {
             if (this.szDescAdd_ByteArray[((int)num5) - 1] != 0)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
             }
             int num6 = TdrTypeUtil.cstrlen(this.szDescAdd_ByteArray) + 1;
             if (num5 != num6)
             {
                 return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
             }
             type = srcBuf.readUInt32(ref this.dwIcon);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bGrade);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bType);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bClass);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readInt32(ref this.iUseShowTip);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readInt32(ref this.iOverLimit);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwCoinBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwCouponsBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwPVPCoinBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwBurningCoinBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwArenaCoinBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwGuildCoinBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwDiamondBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bIsBuyMixPay);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bIsAutoSale);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bIsSale);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwCoinSale);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bIsBatchUse);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt16(ref this.wBatchUseCnt);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwUseGetDiamond);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwRedDot);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt32(ref this.dwCouponsDirectBuy);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             type = srcBuf.readUInt8(ref this.bIsSpecGift);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
             for (int i = 0; i < 5; i++)
             {
                 type = srcBuf.readFloat(ref this.EftParam[i]);
                 if (type != TdrError.ErrorType.TDR_NO_ERROR)
                 {
                     return(type);
                 }
             }
             for (int j = 0; j < 10; j++)
             {
                 type = this.astSrcInfo[j].unpack(ref srcBuf, cutVer);
                 if (type != TdrError.ErrorType.TDR_NO_ERROR)
                 {
                     return(type);
                 }
             }
             this.TransferData();
         }
     }
     return(type);
 }
Beispiel #14
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.dwID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         int count = 0x40;
         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)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bIsView);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num2 = 0x100;
         if (this.szDesc_ByteArray.GetLength(0) < num2)
         {
             this.szDesc_ByteArray = new byte[LENGTH_szDesc];
         }
         type = srcBuf.readCString(ref this.szDesc_ByteArray, num2);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num3 = 0x100;
         if (this.szDescAdd_ByteArray.GetLength(0) < num3)
         {
             this.szDescAdd_ByteArray = new byte[LENGTH_szDescAdd];
         }
         type = srcBuf.readCString(ref this.szDescAdd_ByteArray, num3);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwIcon);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bGrade);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bType);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bClass);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readInt32(ref this.iUseShowTip);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readInt32(ref this.iOverLimit);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwCoinBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwCouponsBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwPVPCoinBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwBurningCoinBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwArenaCoinBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwGuildCoinBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwDiamondBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bIsBuyMixPay);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bIsAutoSale);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bIsSale);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwCoinSale);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt8(ref this.bIsBatchUse);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt16(ref this.wBatchUseCnt);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwUseGetDiamond);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwRedDot);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = srcBuf.readUInt32(ref this.dwCouponsDirectBuy);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         for (int i = 0; i < 4; i++)
         {
             type = srcBuf.readFloat(ref this.EftParam[i]);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         for (int j = 0; j < 10; j++)
         {
             type = this.astSrcInfo[j].load(ref srcBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         this.TransferData();
     }
     return(type);
 }
        public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            if (cutVer == 0u || ResSpecSale.CURRVERSION < cutVer)
            {
                cutVer = ResSpecSale.CURRVERSION;
            }
            if (ResSpecSale.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwSpecSaleType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwSpecSaleId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bCostType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readFloat(ref this.fDiscount);
            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.szOnTime_ByteArray.GetLength(0))
            {
                if ((ulong)num > (ulong)ResSpecSale.LENGTH_szOnTime)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szOnTime_ByteArray = new byte[num];
            }
            if (1u > num)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szOnTime_ByteArray, (int)num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szOnTime_ByteArray[(int)(num - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num2 = TdrTypeUtil.cstrlen(this.szOnTime_ByteArray) + 1;

            if ((ulong)num != (ulong)((long)num2))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            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.szOffTime_ByteArray.GetLength(0))
            {
                if ((ulong)num3 > (ulong)ResSpecSale.LENGTH_szOffTime)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szOffTime_ByteArray = new byte[num3];
            }
            if (1u > num3)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szOffTime_ByteArray, (int)num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szOffTime_ByteArray[(int)(num3 - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num4 = TdrTypeUtil.cstrlen(this.szOffTime_ByteArray) + 1;

            if ((ulong)num3 != (ulong)((long)num4))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt32(ref this.dwStartVIPLvl);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwEndVIPLvl);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwPurchaseCycle);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwBuyLimitNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readInt32(ref this.iRecommend);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwOnTimeGen);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwOffTimeGen);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bShowLimitBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bTag);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwDiscountForDisplay);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwTab);
            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.szSpecialIcon_ByteArray.GetLength(0))
            {
                if ((ulong)num5 > (ulong)ResSpecSale.LENGTH_szSpecialIcon)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                this.szSpecialIcon_ByteArray = new byte[num5];
            }
            if (1u > num5)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
            }
            errorType = srcBuf.readCString(ref this.szSpecialIcon_ByteArray, (int)num5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (this.szSpecialIcon_ByteArray[(int)(num5 - 1u)] != 0)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            int num6 = TdrTypeUtil.cstrlen(this.szSpecialIcon_ByteArray) + 1;

            if ((ulong)num5 != (ulong)((long)num6))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            this.TransferData();
            return(errorType);
        }
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            srcBuf.disableEndian();
            if (cutVer == 0u || ResSpecSale.CURRVERSION < cutVer)
            {
                cutVer = ResSpecSale.CURRVERSION;
            }
            if (ResSpecSale.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwSpecSaleType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwSpecSaleId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bCostType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readFloat(ref this.fDiscount);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num = 16;

            if (this.szOnTime_ByteArray.GetLength(0) < num)
            {
                this.szOnTime_ByteArray = new byte[ResSpecSale.LENGTH_szOnTime];
            }
            errorType = srcBuf.readCString(ref this.szOnTime_ByteArray, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num2 = 16;

            if (this.szOffTime_ByteArray.GetLength(0) < num2)
            {
                this.szOffTime_ByteArray = new byte[ResSpecSale.LENGTH_szOffTime];
            }
            errorType = srcBuf.readCString(ref this.szOffTime_ByteArray, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwStartVIPLvl);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwEndVIPLvl);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwPurchaseCycle);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwBuyLimitNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readInt32(ref this.iRecommend);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwOnTimeGen);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwOffTimeGen);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bShowLimitBuy);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bTag);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwDiscountForDisplay);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwTab);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num3 = 32;

            if (this.szSpecialIcon_ByteArray.GetLength(0) < num3)
            {
                this.szSpecialIcon_ByteArray = new byte[ResSpecSale.LENGTH_szSpecialIcon];
            }
            errorType = srcBuf.readCString(ref this.szSpecialIcon_ByteArray, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            this.TransferData();
            return(errorType);
        }