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.szIconPath_ByteArray.GetLength(0)) { if (dest > LENGTH_szIconPath) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szIconPath_ByteArray = new byte[dest]; } if (1 > dest) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szIconPath_ByteArray, (int)dest); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szIconPath_ByteArray[((int)dest) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szIconPath_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.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) { 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); } 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); } 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); }
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 = this.stCommon.unpack(ref srcBuf, cutVer); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt16(ref this.wLoopDays); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bMultipleTimeNum); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } for (int i = 0; i < 3; i++) { type = this.astMultipleTime[i].unpack(ref srcBuf, cutVer); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } } type = srcBuf.readUInt32(ref this.dwMultipleRatio); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt16(ref this.wPeriodNum); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (0x20 < this.wPeriodNum) { return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT); } this.astPeriod = new ResDT_WealFixedTimeReward[this.wPeriodNum]; for (int j = 0; j < this.wPeriodNum; j++) { this.astPeriod[j] = new ResDT_WealFixedTimeReward(); } for (int k = 0; k < this.wPeriodNum; k++) { type = this.astPeriod[k].unpack(ref srcBuf, cutVer); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } } this.TransferData(); } return(type); }
public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer) { srcBuf.disableEndian(); if (cutVer == 0u || ResSpecialFucUnlock.CURRVERSION < cutVer) { cutVer = ResSpecialFucUnlock.CURRVERSION; } if (ResSpecialFucUnlock.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwFucID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } for (int i = 0; i < 4; i++) { errorType = srcBuf.readUInt32(ref this.UnlockArray[i]); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } int num = 128; if (this.szLockedTip_ByteArray.GetLength(0) < num) { this.szLockedTip_ByteArray = new byte[ResSpecialFucUnlock.LENGTH_szLockedTip]; } errorType = srcBuf.readCString(ref this.szLockedTip_ByteArray, num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bIsShowUnlockTip); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } int num2 = 128; if (this.szUnlockTip_ByteArray.GetLength(0) < num2) { this.szUnlockTip_ByteArray = new byte[ResSpecialFucUnlock.LENGTH_szUnlockTip]; } errorType = srcBuf.readCString(ref this.szUnlockTip_ByteArray, num2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } int num3 = 128; if (this.szUnlockTipIcon_ByteArray.GetLength(0) < num3) { this.szUnlockTipIcon_ByteArray = new byte[ResSpecialFucUnlock.LENGTH_szUnlockTipIcon]; } errorType = srcBuf.readCString(ref this.szUnlockTipIcon_ByteArray, num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bIsAnd); 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 || COMDT_STATISTIC_DATA_INFO_MULTI.CURRVERSION < cutVer) { cutVer = COMDT_STATISTIC_DATA_INFO_MULTI.CURRVERSION; } if (COMDT_STATISTIC_DATA_INFO_MULTI.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bGameType); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bIsPKAI); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bAcntNum); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwWinSum); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwLoseSum); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwDrawSum); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (COMDT_STATISTIC_DATA_INFO_MULTI.VERSION_dwContinuousWin <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwContinuousWin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwContinuousWin = 0u; } if (COMDT_STATISTIC_DATA_INFO_MULTI.VERSION_dwContinuousLose <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwContinuousLose); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwContinuousLose = 0u; } return(errorType); }
public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer) { if (cutVer == 0u || CSDT_SNS_FRIEND_INFO.CURRVERSION < cutVer) { cutVer = CSDT_SNS_FRIEND_INFO.CURRVERSION; } if (CSDT_SNS_FRIEND_INFO.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = this.stSnsFrindInfo.unpack(ref srcBuf, cutVer); 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.szNickName.GetLength(0)) { if ((long)num > (long)((ulong)CSDT_SNS_FRIEND_INFO.LENGTH_szNickName)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szNickName = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szNickName, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szNickName[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szNickName) + 1; if ((ulong)num != (ulong)((long)num2)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt8(ref this.bGameState); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGameStartTime); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwDonateTime); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bVideoState); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } long selector = (long)this.bVideoState; errorType = this.stGameInfo.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(); 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 = 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) { int num2 = 0x40; if (this.szTitle_ByteArray.GetLength(0) < num2) { this.szTitle_ByteArray = new byte[LENGTH_szTitle]; } type = srcBuf.readCString(ref this.szTitle_ByteArray, num2); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num3 = 0x10; if (this.szWidgets_ByteArray.GetLength(0) < num3) { this.szWidgets_ByteArray = new byte[LENGTH_szWidgets]; } type = srcBuf.readCString(ref this.szWidgets_ByteArray, num3); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num4 = 0x400; if (this.szBrief_ByteArray.GetLength(0) < num4) { this.szBrief_ByteArray = new byte[LENGTH_szBrief]; } type = srcBuf.readCString(ref this.szBrief_ByteArray, num4); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num5 = 0x10; if (this.szIcon_ByteArray.GetLength(0) < num5) { this.szIcon_ByteArray = new byte[LENGTH_szIcon]; } type = srcBuf.readCString(ref this.szIcon_ByteArray, num5); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num6 = 0x800; if (this.szDescContent_ByteArray.GetLength(0) < num6) { this.szDescContent_ByteArray = new byte[LENGTH_szDescContent]; } type = srcBuf.readCString(ref this.szDescContent_ByteArray, num6); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num7 = 0x40; if (this.szTips_ByteArray.GetLength(0) < num7) { this.szTips_ByteArray = new byte[LENGTH_szTips]; } type = srcBuf.readCString(ref this.szTips_ByteArray, num7); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bColorBar); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwSortID); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bEntrance); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullShowTime); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwTimeType); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullStartTime); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullEndTime); 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 || ResHeroAdvanceInfo.CURRVERSION < cutVer) { cutVer = ResHeroAdvanceInfo.CURRVERSION; } if (ResHeroAdvanceInfo.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwCfgID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwHeroID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSubQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iCombatEft); 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.szHeroName_ByteArray.GetLength(0)) { if ((long)num > (long)((ulong)ResHeroAdvanceInfo.LENGTH_szHeroName)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szHeroName_ByteArray = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szHeroName_ByteArray, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szHeroName_ByteArray[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szHeroName_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.szColorName_ByteArray.GetLength(0)) { if ((long)num3 > (long)((ulong)ResHeroAdvanceInfo.LENGTH_szColorName)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szColorName_ByteArray = new byte[num3]; } if (1u > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szColorName_ByteArray, (int)num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szColorName_ByteArray[(int)(num3 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szColorName_ByteArray) + 1; if ((ulong)num3 != (ulong)((long)num4)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readInt32(ref this.iHpAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iAtkAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSpellAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iDefAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iResistAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwMaxLevel); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iAdvQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iAdvSubQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwAdvCoin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt16(ref this.wAdvItemType); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwAdvItemID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt16(ref this.wAdvItemCnt); 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 || COMDT_TEAMMEMBER_DETAIL.CURRVERSION < cutVer) { cutVer = COMDT_TEAMMEMBER_DETAIL.CURRVERSION; } if (COMDT_TEAMMEMBER_DETAIL.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = this.stMemberUniq.unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iMemberLogicWorldId); 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.szMemberName.GetLength(0)) { if ((ulong)num > (ulong)COMDT_TEAMMEMBER_DETAIL.LENGTH_szMemberName) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szMemberName = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szMemberName, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szMemberName[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szMemberName) + 1; if ((ulong)num != (ulong)((long)num2)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt32(ref this.dwMemberLevel); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwMemberPvpLevel); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwMemberHeadId); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iMMR); 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.szMemberHeadUrl.GetLength(0)) { if ((ulong)num3 > (ulong)COMDT_TEAMMEMBER_DETAIL.LENGTH_szMemberHeadUrl) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szMemberHeadUrl = new byte[num3]; } if (1u > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szMemberHeadUrl, (int)num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szMemberHeadUrl[(int)(num3 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szMemberHeadUrl) + 1; if ((ulong)num3 != (ulong)((long)num4)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt8(ref this.bIsWarmBattle); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bIsSingleBattle); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = this.stVip.unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bWarmBattleAILevel); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (COMDT_TEAMMEMBER_DETAIL.VERSION_ullGuildID <= cutVer) { errorType = srcBuf.readUInt64(ref this.ullGuildID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.ullGuildID = 0uL; } errorType = srcBuf.readInt32(ref this.iGuildLogicWorldID); 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.readUInt8(ref this.bShowGradeOfRank); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGradeRankNo); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGradeClass); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bBattleResultMode); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } return(errorType); }
public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer) { if (cutVer == 0u || ResBurningBuff.CURRVERSION < cutVer) { cutVer = ResBurningBuff.CURRVERSION; } if (ResBurningBuff.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readInt32(ref this.iSkillCombineID); 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.szBuffDesc_ByteArray.GetLength(0)) { if ((long)num > (long)((ulong)ResBurningBuff.LENGTH_szBuffDesc)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szBuffDesc_ByteArray = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szBuffDesc_ByteArray, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szBuffDesc_ByteArray[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szBuffDesc_ByteArray) + 1; if ((ulong)num != (ulong)((long)num2)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt8(ref this.bBuffType); 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.szBuffIcon_ByteArray.GetLength(0)) { if ((long)num3 > (long)((ulong)ResBurningBuff.LENGTH_szBuffIcon)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szBuffIcon_ByteArray = new byte[num3]; } if (1u > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szBuffIcon_ByteArray, (int)num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szBuffIcon_ByteArray[(int)(num3 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szBuffIcon_ByteArray) + 1; if ((ulong)num3 != (ulong)((long)num4)) { 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 || ResHeroAdvanceInfo.CURRVERSION < cutVer) { cutVer = ResHeroAdvanceInfo.CURRVERSION; } if (ResHeroAdvanceInfo.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwCfgID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwHeroID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSubQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iCombatEft); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } int num = 32; if (this.szHeroName_ByteArray.GetLength(0) < num) { this.szHeroName_ByteArray = new byte[ResHeroAdvanceInfo.LENGTH_szHeroName]; } errorType = srcBuf.readCString(ref this.szHeroName_ByteArray, num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } int num2 = 32; if (this.szColorName_ByteArray.GetLength(0) < num2) { this.szColorName_ByteArray = new byte[ResHeroAdvanceInfo.LENGTH_szColorName]; } errorType = srcBuf.readCString(ref this.szColorName_ByteArray, num2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iHpAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iAtkAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSpellAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iDefAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iResistAddVal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwMaxLevel); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iAdvQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iAdvSubQuality); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwAdvCoin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt16(ref this.wAdvItemType); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwAdvItemID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt16(ref this.wAdvItemCnt); 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 || COMDT_GUILD_MATCH_HISTORY_MEMBER_INFO.CURRVERSION < cutVer) { cutVer = COMDT_GUILD_MATCH_HISTORY_MEMBER_INFO.CURRVERSION; } if (COMDT_GUILD_MATCH_HISTORY_MEMBER_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.szName.GetLength(0)) { if ((ulong)num > (ulong)COMDT_GUILD_MATCH_HISTORY_MEMBER_INFO.LENGTH_szName) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szName = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szName, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szName[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szName) + 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.szHeadUrl.GetLength(0)) { if ((ulong)num3 > (ulong)COMDT_GUILD_MATCH_HISTORY_MEMBER_INFO.LENGTH_szHeadUrl) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szHeadUrl = new byte[num3]; } if (1u > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szHeadUrl, (int)num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szHeadUrl[(int)(num3 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szHeadUrl) + 1; if ((ulong)num3 != (ulong)((long)num4)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt8(ref this.bIsTeamLeader); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } return(errorType); }
public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer) { if (cutVer == 0u || ResNpcOfArena.CURRVERSION < cutVer) { cutVer = ResNpcOfArena.CURRVERSION; } if (ResNpcOfArena.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwObjId); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwForceValue); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwBattleList); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwNpcLevel); 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.szNpcName_ByteArray.GetLength(0)) { if ((ulong)num > (ulong)ResNpcOfArena.LENGTH_szNpcName) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szNpcName_ByteArray = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szNpcName_ByteArray, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szNpcName_ByteArray[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szNpcName_ByteArray) + 1; if ((ulong)num != (ulong)((long)num2)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt32(ref this.dwNpcHeadId); 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 || COMDT_ACNT_TASKINFO.CURRVERSION < cutVer) { cutVer = COMDT_ACNT_TASKINFO.CURRVERSION; } if (COMDT_ACNT_TASKINFO.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType; if (COMDT_ACNT_TASKINFO.VERSION_wMaxUsualTaskRefrshCnt <= cutVer) { errorType = srcBuf.readUInt16(ref this.wMaxUsualTaskRefrshCnt); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.wMaxUsualTaskRefrshCnt = 0; } errorType = srcBuf.readUInt32(ref this.dwLastFreshTime); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (COMDT_ACNT_TASKINFO.VERSION_dwLastMainTaskFreshTime <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwLastMainTaskFreshTime); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwLastMainTaskFreshTime = 0u; } errorType = srcBuf.readUInt32(ref this.dwCurtaskNum); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (85u < this.dwCurtaskNum) { return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT); } int num = 0; while ((long)num < (long)((ulong)this.dwCurtaskNum)) { errorType = this.astCurtask[num].unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } num++; } if (COMDT_ACNT_TASKINFO.VERSION_MainTaskIDs <= cutVer) { for (int i = 0; i < 10; i++) { errorType = srcBuf.readUInt32(ref this.MainTaskIDs[i]); 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_TRANS_CONTEXT_OF_CONFIRM_STUDENTREQ.CURRVERSION < cutVer) { cutVer = COMDT_TRANS_CONTEXT_OF_CONFIRM_STUDENTREQ.CURRVERSION; } if (COMDT_TRANS_CONTEXT_OF_CONFIRM_STUDENTREQ.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = this.stMasterUniq.unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = this.stStudentUniq.unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bStudentMaxGrade); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = this.stSrcUserInfo.unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = this.stDestUserInfo.unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bDestAcntOnline); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwDestAcntGameSvrEntity); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwMaxStudentNum); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bInsertSucc); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bReqType); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bNoAskforFlag); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } return(errorType); }
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.dwHeroID); 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.szHeroName_ByteArray.GetLength(0)) { if (dest > LENGTH_szHeroName) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szHeroName_ByteArray = new byte[dest]; } if (1 > dest) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szHeroName_ByteArray, (int)dest); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szHeroName_ByteArray[((int)dest) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szHeroName_ByteArray) + 1; if (dest != num2) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } type = srcBuf.readUInt32(ref this.dwSkinID); 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.szSkinName_ByteArray.GetLength(0)) { if (num3 > LENGTH_szSkinName) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szSkinName_ByteArray = new byte[num3]; } if (1 > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szSkinName_ByteArray, (int)num3); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szSkinName_ByteArray[((int)num3) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szSkinName_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.szSkinDesc_ByteArray.GetLength(0)) { if (num5 > LENGTH_szSkinDesc) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szSkinDesc_ByteArray = new byte[num5]; } if (1 > num5) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szSkinDesc_ByteArray, (int)num5); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szSkinDesc_ByteArray[((int)num5) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num6 = TdrTypeUtil.cstrlen(this.szSkinDesc_ByteArray) + 1; if (num5 != num6) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } type = srcBuf.readUInt8(ref this.bIsLimitSkin); 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.szLimitQualityPic_ByteArray.GetLength(0)) { if (num7 > LENGTH_szLimitQualityPic) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szLimitQualityPic_ByteArray = new byte[num7]; } if (1 > num7) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szLimitQualityPic_ByteArray, (int)num7); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szLimitQualityPic_ByteArray[((int)num7) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num8 = TdrTypeUtil.cstrlen(this.szLimitQualityPic_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.szLimitLabelPic_ByteArray.GetLength(0)) { if (num9 > LENGTH_szLimitLabelPic) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szLimitLabelPic_ByteArray = new byte[num9]; } if (1 > num9) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szLimitLabelPic_ByteArray, (int)num9); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szLimitLabelPic_ByteArray[((int)num9) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num10 = TdrTypeUtil.cstrlen(this.szLimitLabelPic_ByteArray) + 1; if (num9 != num10) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } type = srcBuf.readUInt8(ref this.bSkinQuality); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bGetPathType); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } 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.szGetPath_ByteArray.GetLength(0)) { if (num11 > LENGTH_szGetPath) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szGetPath_ByteArray = new byte[num11]; } if (1 > num11) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szGetPath_ByteArray, (int)num11); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szGetPath_ByteArray[((int)num11) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num12 = TdrTypeUtil.cstrlen(this.szGetPath_ByteArray) + 1; if (num11 != num12) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } type = srcBuf.readUInt8(ref this.bIsBuyCoupons); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuyCoupons); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsBuySkinCoin); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuySkinCoin); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsBuyDiamond); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuyDiamond); 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.bIsBuyItem); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuyItemCnt); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsPresent); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwSortId); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bPromotionCnt); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } for (int i = 0; i < 5; i++) { type = srcBuf.readUInt32(ref this.PromotionID[i]); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } } type = srcBuf.readUInt32(ref this.dwChgItemCnt); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } uint num14 = 0; type = srcBuf.readUInt32(ref num14); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (num14 > srcBuf.getLeftSize()) { return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ); } if (num14 > this.szOnTimeStr_ByteArray.GetLength(0)) { if (num14 > LENGTH_szOnTimeStr) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szOnTimeStr_ByteArray = new byte[num14]; } if (1 > num14) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szOnTimeStr_ByteArray, (int)num14); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szOnTimeStr_ByteArray[((int)num14) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num15 = TdrTypeUtil.cstrlen(this.szOnTimeStr_ByteArray) + 1; if (num14 != num15) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } uint num16 = 0; type = srcBuf.readUInt32(ref num16); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (num16 > srcBuf.getLeftSize()) { return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ); } if (num16 > this.szOffTimeStr_ByteArray.GetLength(0)) { if (num16 > LENGTH_szOffTimeStr) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szOffTimeStr_ByteArray = new byte[num16]; } if (1 > num16) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szOffTimeStr_ByteArray, (int)num16); if (type == TdrError.ErrorType.TDR_NO_ERROR) { if (this.szOffTimeStr_ByteArray[((int)num16) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num17 = TdrTypeUtil.cstrlen(this.szOffTimeStr_ByteArray) + 1; if (num16 != num17) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } 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.readUInt32(ref this.dwReleaseId); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bShowInShop); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bShowInMgr); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bRankLimitType); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bRankLimitGrade); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullRankLimitParam); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } this.TransferData(); } } return(type); }
public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer) { if (cutVer == 0u || COMDT_MULTIPLE_INFO.CURRVERSION < cutVer) { cutVer = COMDT_MULTIPLE_INFO.CURRVERSION; } if (COMDT_MULTIPLE_INFO.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwWealRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwQQVIPRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwPropRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (COMDT_MULTIPLE_INFO.VERSION_dwPvpDailyRatio <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwPvpDailyRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwPvpDailyRatio = 0u; } if (COMDT_MULTIPLE_INFO.VERSION_dwWXGameCenterLoginRatio <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwWXGameCenterLoginRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwWXGameCenterLoginRatio = 0u; } if (COMDT_MULTIPLE_INFO.VERSION_dwGuildRatio <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwGuildRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwGuildRatio = 0u; } if (COMDT_MULTIPLE_INFO.VERSION_dwFirstWinAdd <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwFirstWinAdd); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwFirstWinAdd = 0u; } if (COMDT_MULTIPLE_INFO.VERSION_dwGameVIPRatio <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwGameVIPRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwGameVIPRatio = 0u; } if (COMDT_MULTIPLE_INFO.VERSION_dwQQGameCenterLoginRatio <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwQQGameCenterLoginRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwQQGameCenterLoginRatio = 0u; } if (COMDT_MULTIPLE_INFO.VERSION_dwIOSVisitorLoginRatio <= cutVer) { errorType = srcBuf.readUInt32(ref this.dwIOSVisitorLoginRatio); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } else { this.dwIOSVisitorLoginRatio = 0u; } return(errorType); }
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.dwHeroID); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int count = 0x20; if (this.szHeroName_ByteArray.GetLength(0) < count) { this.szHeroName_ByteArray = new byte[LENGTH_szHeroName]; } type = srcBuf.readCString(ref this.szHeroName_ByteArray, count); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwSkinID); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num2 = 0x20; if (this.szSkinName_ByteArray.GetLength(0) < num2) { this.szSkinName_ByteArray = new byte[LENGTH_szSkinName]; } type = srcBuf.readCString(ref this.szSkinName_ByteArray, num2); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num3 = 0x100; if (this.szSkinDesc_ByteArray.GetLength(0) < num3) { this.szSkinDesc_ByteArray = new byte[LENGTH_szSkinDesc]; } type = srcBuf.readCString(ref this.szSkinDesc_ByteArray, num3); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsLimitSkin); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num4 = 0x80; if (this.szLimitQualityPic_ByteArray.GetLength(0) < num4) { this.szLimitQualityPic_ByteArray = new byte[LENGTH_szLimitQualityPic]; } type = srcBuf.readCString(ref this.szLimitQualityPic_ByteArray, num4); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num5 = 0x80; if (this.szLimitLabelPic_ByteArray.GetLength(0) < num5) { this.szLimitLabelPic_ByteArray = new byte[LENGTH_szLimitLabelPic]; } type = srcBuf.readCString(ref this.szLimitLabelPic_ByteArray, num5); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bSkinQuality); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bGetPathType); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num6 = 0x100; if (this.szGetPath_ByteArray.GetLength(0) < num6) { this.szGetPath_ByteArray = new byte[LENGTH_szGetPath]; } type = srcBuf.readCString(ref this.szGetPath_ByteArray, num6); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsBuyCoupons); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuyCoupons); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsBuySkinCoin); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuySkinCoin); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsBuyDiamond); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuyDiamond); 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.bIsBuyItem); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwBuyItemCnt); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bIsPresent); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwSortId); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bPromotionCnt); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } for (int i = 0; i < 5; i++) { type = srcBuf.readUInt32(ref this.PromotionID[i]); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } } type = srcBuf.readUInt32(ref this.dwChgItemCnt); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num8 = 0x10; if (this.szOnTimeStr_ByteArray.GetLength(0) < num8) { this.szOnTimeStr_ByteArray = new byte[LENGTH_szOnTimeStr]; } type = srcBuf.readCString(ref this.szOnTimeStr_ByteArray, num8); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } int num9 = 0x10; if (this.szOffTimeStr_ByteArray.GetLength(0) < num9) { this.szOffTimeStr_ByteArray = new byte[LENGTH_szOffTimeStr]; } type = srcBuf.readCString(ref this.szOffTimeStr_ByteArray, num9); 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.readUInt32(ref this.dwReleaseId); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bShowInShop); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bShowInMgr); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bRankLimitType); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bRankLimitGrade); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullRankLimitParam); 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.szTitle_ByteArray.GetLength(0)) { if (num3 > LENGTH_szTitle) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szTitle_ByteArray = new byte[num3]; } if (1 > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szTitle_ByteArray, (int)num3); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szTitle_ByteArray[((int)num3) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szTitle_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.szWidgets_ByteArray.GetLength(0)) { if (num5 > LENGTH_szWidgets) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szWidgets_ByteArray = new byte[num5]; } if (1 > num5) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szWidgets_ByteArray, (int)num5); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szWidgets_ByteArray[((int)num5) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num6 = TdrTypeUtil.cstrlen(this.szWidgets_ByteArray) + 1; if (num5 != num6) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } 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.szBrief_ByteArray.GetLength(0)) { if (num7 > LENGTH_szBrief) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szBrief_ByteArray = new byte[num7]; } if (1 > num7) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szBrief_ByteArray, (int)num7); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szBrief_ByteArray[((int)num7) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num8 = TdrTypeUtil.cstrlen(this.szBrief_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.szIcon_ByteArray.GetLength(0)) { if (num9 > LENGTH_szIcon) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szIcon_ByteArray = new byte[num9]; } if (1 > num9) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szIcon_ByteArray, (int)num9); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szIcon_ByteArray[((int)num9) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num10 = TdrTypeUtil.cstrlen(this.szIcon_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.szDescContent_ByteArray.GetLength(0)) { if (num11 > LENGTH_szDescContent) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szDescContent_ByteArray = new byte[num11]; } if (1 > num11) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szDescContent_ByteArray, (int)num11); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szDescContent_ByteArray[((int)num11) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num12 = TdrTypeUtil.cstrlen(this.szDescContent_ByteArray) + 1; if (num11 != num12) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } uint num13 = 0; type = srcBuf.readUInt32(ref num13); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (num13 > srcBuf.getLeftSize()) { return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ); } if (num13 > this.szTips_ByteArray.GetLength(0)) { if (num13 > LENGTH_szTips) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szTips_ByteArray = new byte[num13]; } if (1 > num13) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szTips_ByteArray, (int)num13); if (type == TdrError.ErrorType.TDR_NO_ERROR) { if (this.szTips_ByteArray[((int)num13) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num14 = TdrTypeUtil.cstrlen(this.szTips_ByteArray) + 1; if (num13 != num14) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } type = srcBuf.readUInt8(ref this.bColorBar); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwSortID); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bEntrance); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullShowTime); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwTimeType); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullStartTime); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt64(ref this.ullEndTime); 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 || ResSymbolInfo.CURRVERSION < cutVer) { cutVer = ResSymbolInfo.CURRVERSION; } if (ResSymbolInfo.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)ResSymbolInfo.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); } 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)ResSymbolInfo.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); } errorType = srcBuf.readUInt32(ref this.dwIcon); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt16(ref this.wLevel); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bIsMakeShow); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt16(ref this.wType); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bColor); 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.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.readInt32(ref this.iCombatEft); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGuildFacLv); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGuildHisConstruct); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGuildConstruct); 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.szDisplayName_ByteArray.GetLength(0)) { if ((long)num5 > (long)((ulong)ResSymbolInfo.LENGTH_szDisplayName)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szDisplayName_ByteArray = new byte[num5]; } if (1u > num5) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szDisplayName_ByteArray, (int)num5); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szDisplayName_ByteArray[(int)(num5 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num6 = TdrTypeUtil.cstrlen(this.szDisplayName_ByteArray) + 1; if ((ulong)num5 != (ulong)((long)num6)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt32(ref this.dwNextLvID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwMakeCoin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwBreakCoin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bFuncEftCnt); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } for (int i = 0; i < 3; i++) { errorType = this.astFuncEftList[i].unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } errorType = srcBuf.readUInt8(ref this.bPveEftCnt); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } for (int j = 0; j < 8; j++) { errorType = this.astPveEftList[j].unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } for (int k = 0; k < 10; k++) { errorType = this.astSrcInfo[k].unpack(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } errorType = srcBuf.readUInt8(ref this.bNeedPswd); 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 || COMDT_IDIP_MAIL_INFO.CURRVERSION < cutVer) { cutVer = COMDT_IDIP_MAIL_INFO.CURRVERSION; } if (COMDT_IDIP_MAIL_INFO.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt8(ref this.bMailType); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bMailsubType); 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.szFrom.GetLength(0)) { if ((ulong)num > (ulong)COMDT_IDIP_MAIL_INFO.LENGTH_szFrom) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szFrom = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szFrom, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szFrom[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szFrom) + 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.szTo.GetLength(0)) { if ((ulong)num3 > (ulong)COMDT_IDIP_MAIL_INFO.LENGTH_szTo) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szTo = new byte[num3]; } if (1u > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szTo, (int)num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szTo[(int)(num3 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szTo) + 1; if ((ulong)num3 != (ulong)((long)num4)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt64(ref this.ullToUid); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwToLogicWorld); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bSubjectLen); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (128 < this.bSubjectLen) { return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT); } this.szSubject = new sbyte[(int)this.bSubjectLen]; for (int i = 0; i < (int)this.bSubjectLen; i++) { errorType = srcBuf.readInt8(ref this.szSubject[i]); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } errorType = srcBuf.readUInt16(ref this.wContentLen); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (600 < this.wContentLen) { return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT); } this.szContent = new sbyte[(int)this.wContentLen]; for (int j = 0; j < (int)this.wContentLen; j++) { errorType = srcBuf.readInt8(ref this.szContent[j]); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } errorType = srcBuf.readUInt8(ref this.bAccessCnt); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (10 < this.bAccessCnt) { return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT); } for (int k = 0; k < (int)this.bAccessCnt; k++) { errorType = this.astAccess[k].unpack(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 || ResSymbolInfo.CURRVERSION < cutVer) { cutVer = ResSymbolInfo.CURRVERSION; } if (ResSymbolInfo.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[ResSymbolInfo.LENGTH_szName]; } errorType = srcBuf.readCString(ref this.szName_ByteArray, num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } int num2 = 256; if (this.szDesc_ByteArray.GetLength(0) < num2) { this.szDesc_ByteArray = new byte[ResSymbolInfo.LENGTH_szDesc]; } errorType = srcBuf.readCString(ref this.szDesc_ByteArray, num2); 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.readUInt16(ref this.wLevel); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bIsMakeShow); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt16(ref this.wType); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bColor); 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.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.readInt32(ref this.iCombatEft); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGuildFacLv); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGuildHisConstruct); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwGuildConstruct); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } int num3 = 64; if (this.szDisplayName_ByteArray.GetLength(0) < num3) { this.szDisplayName_ByteArray = new byte[ResSymbolInfo.LENGTH_szDisplayName]; } errorType = srcBuf.readCString(ref this.szDisplayName_ByteArray, num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwNextLvID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwMakeCoin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwBreakCoin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt8(ref this.bFuncEftCnt); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } for (int i = 0; i < 3; i++) { errorType = this.astFuncEftList[i].load(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } errorType = srcBuf.readUInt8(ref this.bPveEftCnt); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } for (int j = 0; j < 8; j++) { errorType = this.astPveEftList[j].load(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } for (int k = 0; k < 10; k++) { errorType = this.astSrcInfo[k].load(ref srcBuf, cutVer); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } } errorType = srcBuf.readUInt8(ref this.bNeedPswd); 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 || ResSpecialFucUnlock.CURRVERSION < cutVer) { cutVer = ResSpecialFucUnlock.CURRVERSION; } if (ResSpecialFucUnlock.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwFucID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } for (int i = 0; i < 4; i++) { errorType = srcBuf.readUInt32(ref this.UnlockArray[i]); 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.szLockedTip_ByteArray.GetLength(0)) { if ((ulong)num > (ulong)ResSpecialFucUnlock.LENGTH_szLockedTip) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szLockedTip_ByteArray = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szLockedTip_ByteArray, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szLockedTip_ByteArray[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szLockedTip_ByteArray) + 1; if ((ulong)num != (ulong)((long)num2)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt8(ref this.bIsShowUnlockTip); 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.szUnlockTip_ByteArray.GetLength(0)) { if ((ulong)num3 > (ulong)ResSpecialFucUnlock.LENGTH_szUnlockTip) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szUnlockTip_ByteArray = new byte[num3]; } if (1u > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szUnlockTip_ByteArray, (int)num3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szUnlockTip_ByteArray[(int)(num3 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szUnlockTip_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.szUnlockTipIcon_ByteArray.GetLength(0)) { if ((ulong)num5 > (ulong)ResSpecialFucUnlock.LENGTH_szUnlockTipIcon) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szUnlockTipIcon_ByteArray = new byte[num5]; } if (1u > num5) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szUnlockTipIcon_ByteArray, (int)num5); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szUnlockTipIcon_ByteArray[(int)(num5 - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num6 = TdrTypeUtil.cstrlen(this.szUnlockTipIcon_ByteArray) + 1; if ((ulong)num5 != (ulong)((long)num6)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } errorType = srcBuf.readUInt8(ref this.bIsAnd); 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_MOD_GUILD_MATCH_SIGNUP_REQ.CURRVERSION < cutVer) { cutVer = CSPKG_MOD_GUILD_MATCH_SIGNUP_REQ.CURRVERSION; } if (CSPKG_MOD_GUILD_MATCH_SIGNUP_REQ.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.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)CSPKG_MOD_GUILD_MATCH_SIGNUP_REQ.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 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); }
public override TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer) { if (cutVer == 0u || CSPKG_SECURE_INFO_START_REQ.CURRVERSION < cutVer) { cutVer = CSPKG_SECURE_INFO_START_REQ.CURRVERSION; } if (CSPKG_SECURE_INFO_START_REQ.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwClientStartTime); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBossCount); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBossHPMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBossHPMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBossHPTotal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyBuildingHPMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyBuildingHPMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyHPTotal); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyHPMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyHPMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBossAttackMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBossAttackMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyBuildingAttackMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyBuildingAttackMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyAttackMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyAttackMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBuildingHPMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBuildingHPMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBuildingAttackMax); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrBuildingAttackMin); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserBattlePoint); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardID1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardHP1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardATN1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardINT1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardSpeed1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardPhyDef1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardSpellDef1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardID2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardHP2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardATN2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardINT2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardSpeed2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardPhyDef2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardSpellDef2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardID3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardHP3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardATN3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardINT3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardSpeed3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardPhyDef3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrUserCardSpellDef3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyBattlePoint); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardID1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardHP1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardATN1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardINT1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardSpeed1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardPhyDef1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardSpellDef1); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardID2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardHP2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardATN2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardINT2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardSpeed2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardPhyDef2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardSpellDef2); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardID3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardHP3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardATN3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardINT3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardSpeed3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardPhyDef3); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readInt32(ref this.iSvrEmenyCardSpellDef3); 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_CHAT_MSG_HORN.CURRVERSION < cutVer) { cutVer = COMDT_CHAT_MSG_HORN.CURRVERSION; } if (COMDT_CHAT_MSG_HORN.BASEVERSION > cutVer) { return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL); } TdrError.ErrorType errorType = srcBuf.readUInt32(ref this.dwHornID); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwBeginShowSec); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = srcBuf.readUInt32(ref this.dwEndShowSec); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } errorType = this.stFrom.unpack(ref srcBuf, cutVer); 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.szContent.GetLength(0)) { if ((ulong)num > (ulong)COMDT_CHAT_MSG_HORN.LENGTH_szContent) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szContent = new byte[num]; } if (1u > num) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } errorType = srcBuf.readCString(ref this.szContent, (int)num); if (errorType != TdrError.ErrorType.TDR_NO_ERROR) { return(errorType); } if (this.szContent[(int)(num - 1u)] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szContent) + 1; if ((ulong)num != (ulong)((long)num2)) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } 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.dwHeadId); 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.szUserName.GetLength(0)) { if (dest > LENGTH_szUserName) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szUserName = new byte[dest]; } if (1 > dest) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szUserName, (int)dest); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.szUserName[((int)dest) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num2 = TdrTypeUtil.cstrlen(this.szUserName) + 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.szTelecomOper.GetLength(0)) { if (num3 > LENGTH_szTelecomOper) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG); } this.szTelecomOper = new byte[num3]; } if (1 > num3) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL); } type = srcBuf.readCString(ref this.szTelecomOper, (int)num3); if (type == TdrError.ErrorType.TDR_NO_ERROR) { if (this.szTelecomOper[((int)num3) - 1] != 0) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } int num4 = TdrTypeUtil.cstrlen(this.szTelecomOper) + 1; if (num3 != num4) { return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT); } type = srcBuf.readInt32(ref this.iRegChannel); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } } } 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); } type = srcBuf.readUInt32(ref this.dwID); if (type == TdrError.ErrorType.TDR_NO_ERROR) { type = this.stCommon.load(ref srcBuf, cutVer); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt16(ref this.wLoopDays); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bMultipleTimeNum); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } for (int i = 0; i < 3; i++) { type = this.astMultipleTime[i].load(ref srcBuf, cutVer); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } } type = srcBuf.readUInt32(ref this.dwMultipleRatio); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt16(ref this.wPeriodNum); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } if (this.astPeriod.Length < 0x20) { this.astPeriod = new ResDT_WealFixedTimeReward[0x20]; for (int k = 0; k < 0x20; k++) { this.astPeriod[k] = new ResDT_WealFixedTimeReward(); } } for (int j = 0; j < 0x20; j++) { type = this.astPeriod[j].load(ref srcBuf, cutVer); 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); } type = srcBuf.readUInt32(ref this.dwID); if (type == TdrError.ErrorType.TDR_NO_ERROR) { type = srcBuf.readUInt16(ref this.wSymbolLevel); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bCompType); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwCompParam); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwComposeID); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwCoinComp); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt32(ref this.dwCouponsComp); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } type = srcBuf.readUInt8(ref this.bCompCnt); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } for (int i = 0; i < 4; i++) { type = this.astCompInfo[i].load(ref srcBuf, cutVer); if (type != TdrError.ErrorType.TDR_NO_ERROR) { return(type); } } this.TransferData(); } return(type); }