示例#1
0
        public TdrError.ErrorType pack(ref byte[] buffer, int size, ref int usedSize, uint cutVer)
        {
            if (buffer == null || buffer.GetLength(0) == 0 || size > buffer.GetLength(0))
            {
                return(TdrError.ErrorType.TDR_ERR_INVALID_BUFFER_PARAMETER);
            }
            TdrWriteBuf tdrWriteBuf = ClassObjPool <TdrWriteBuf> .Get();

            tdrWriteBuf.set(ref buffer, size);
            TdrError.ErrorType errorType = this.pack(ref tdrWriteBuf, cutVer);
            if (errorType == TdrError.ErrorType.TDR_NO_ERROR)
            {
                buffer   = tdrWriteBuf.getBeginPtr();
                usedSize = tdrWriteBuf.getUsedSize();
            }
            tdrWriteBuf.Release();
            return(errorType);
        }
        public TdrError.ErrorType pack(long selector, ref byte[] buffer, int size, ref int usedSize, uint cutVer)
        {
            if ((buffer.GetLength(0) == 0) || (size > buffer.GetLength(0)))
            {
                return(TdrError.ErrorType.TDR_ERR_INVALID_BUFFER_PARAMETER);
            }
            TdrWriteBuf destBuf = ClassObjPool <TdrWriteBuf> .Get();

            destBuf.set(ref buffer, size);
            TdrError.ErrorType type = this.pack(selector, ref destBuf, cutVer);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                buffer   = destBuf.getBeginPtr();
                usedSize = destBuf.getUsedSize();
            }
            destBuf.Release();
            return(type);
        }
示例#3
0
        public TdrError.ErrorType pack(ref byte[] buffer, int size, ref int usedSize, uint cutVer)
        {
            if (null == buffer || 0 == buffer.GetLength(0) || (size > buffer.GetLength(0)))
            {
                return(TdrError.ErrorType.TDR_ERR_INVALID_BUFFER_PARAMETER);
            }

            TdrWriteBuf destBuf = new TdrWriteBuf(ref buffer, size);

            TdrError.ErrorType ret = pack(ref destBuf, cutVer);
            if (ret == TdrError.ErrorType.TDR_NO_ERROR)
            {
                buffer = destBuf.getBeginPtr();

                usedSize = destBuf.getUsedSize();
            }

            return(ret);
        }
示例#4
0
 public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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 = destBuf.writeInt32(this.iActId);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         int pos = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num2  = destBuf.getUsedSize();
         int count = TdrTypeUtil.cstrlen(this.szGainChestId);
         if (count >= 0x100)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szGainChestId, count);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num4 = destBuf.getUsedSize() - num2;
         type = destBuf.writeUInt32((uint)num4, pos);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt16(this.wTitleLen);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (0x80 < this.wTitleLen)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         if (this.szChestTitle.Length < this.wTitleLen)
         {
             return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
         }
         for (int i = 0; i < this.wTitleLen; i++)
         {
             type = destBuf.writeInt8(this.szChestTitle[i]);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         type = destBuf.writeUInt16(this.wContentLen);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (0x100 < this.wContentLen)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         if (this.szChestContent.Length < this.wContentLen)
         {
             return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
         }
         for (int j = 0; j < this.wContentLen; j++)
         {
             type = destBuf.writeInt8(this.szChestContent[j]);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         type = destBuf.writeInt32(this.iResult);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     return(type);
 }
 public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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 = destBuf.writeUInt32(this.dwGuildHeadID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         int pos = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num2  = destBuf.getUsedSize();
         int count = TdrTypeUtil.cstrlen(this.szGuildName);
         if (count >= 0x20)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szGuildName, count);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num4 = destBuf.getUsedSize() - num2;
         type = destBuf.writeUInt32((uint)num4, pos);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bGuildLevel);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bMemberNum);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (VERSION_dwStar <= cutVer)
         {
             type = destBuf.writeUInt32(this.dwStar);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         if (VERSION_dwTotalRankPoint <= cutVer)
         {
             type = destBuf.writeUInt32(this.dwTotalRankPoint);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
     }
     return(type);
 }
 public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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 = destBuf.writeUInt32(this.dwGuildHeadID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         int pos = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num2  = destBuf.getUsedSize();
         int count = TdrTypeUtil.cstrlen(this.szGuildName);
         if (count >= 0x20)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szGuildName, count);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num4 = destBuf.getUsedSize() - num2;
         type = destBuf.writeUInt32((uint)num4, pos);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bGuildLevel);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bMemberNum);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwChairManHeadID);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num5 = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num6 = destBuf.getUsedSize();
         int num7 = TdrTypeUtil.cstrlen(this.szChairManHeadUrl);
         if (num7 >= 0x100)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szChairManHeadUrl, num7);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num8 = destBuf.getUsedSize() - num6;
         type = destBuf.writeUInt32((uint)num8, num5);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num9 = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num10 = destBuf.getUsedSize();
         int num11 = TdrTypeUtil.cstrlen(this.szChairManName);
         if (num11 >= 0x40)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szChairManName, num11);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num12 = destBuf.getUsedSize() - num10;
         type = destBuf.writeUInt32((uint)num12, num9);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwChairManLv);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num13 = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num14 = destBuf.getUsedSize();
         int num15 = TdrTypeUtil.cstrlen(this.szGuildNotice);
         if (num15 >= 0x80)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szGuildNotice, num15);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num16 = destBuf.getUsedSize() - num14;
         type = destBuf.writeUInt32((uint)num16, num13);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (VERSION_stChairManVip <= cutVer)
         {
             type = this.stChairManVip.pack(ref destBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         if (VERSION_dwStar <= cutVer)
         {
             type = destBuf.writeUInt32(this.dwStar);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         if (VERSION_dwTotalRankPoint <= cutVer)
         {
             type = destBuf.writeUInt32(this.dwTotalRankPoint);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
     }
     return(type);
 }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_MULTIGAME_MEMBER_BRIEF_INFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_MULTIGAME_MEMBER_BRIEF_INFO.CURRVERSION;
            }
            if (COMDT_MULTIGAME_MEMBER_BRIEF_INFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            int usedSize = destBuf.getUsedSize();

            TdrError.ErrorType errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szAcntOpenID);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szAcntOpenID, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt64(this.ullAcntUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iAcntLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szAcntName);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szAcntName, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bAcntCamp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bBeComplainted);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bGradeOfRank);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwKillCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwDeadCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwAssistCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwNoAIKillCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwNoAIDeadCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwNoAIAssistCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwTotalHurtHeroCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwTotalBeHurtCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwTotalInBattleCoin);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwHangupRatio);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize5 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize6 = destBuf.getUsedSize();
            int num3      = TdrTypeUtil.cstrlen(this.szCodeName);

            if (num3 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szCodeName, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src3 = destBuf.getUsedSize() - usedSize6;

            errorType = destBuf.writeUInt32((uint)src3, usedSize5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iMVPScore);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwMatchMMR);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwMasterLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt64(this.ullMasterUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwMasterLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwBattleHeroId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#8
0
 public TdrError.ErrorType packTLV(ref TdrWriteBuf destBuf, bool useVarInt)
 {
     TdrError.ErrorType errorType;
     if (useVarInt)
     {
         uint src = TdrTLV.makeTag(1, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_VARINT);
         errorType = destBuf.writeVarUInt32(src);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
         errorType = destBuf.writeVarUInt32(this.dwDataLen);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     else
     {
         uint src2 = TdrTLV.makeTag(1, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_4_BYTE);
         errorType = destBuf.writeVarUInt32(src2);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
         errorType = destBuf.writeUInt32(this.dwDataLen);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     if (this.dwDataLen > 1048576u)
     {
         return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
     }
     if (this.dwDataLen > 0u)
     {
         uint src3 = TdrTLV.makeTag(2, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_LENGTH_DELIMITED);
         errorType = destBuf.writeVarUInt32(src3);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
         int usedSize = destBuf.getUsedSize();
         errorType = destBuf.reserve(4);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
         int num = 0;
         while ((long)num < (long)((ulong)this.dwDataLen))
         {
             errorType = destBuf.writeUInt8(this.szData[num]);
             if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(errorType);
             }
             num++;
         }
         int src4 = destBuf.getUsedSize() - usedSize - 4;
         errorType = destBuf.writeInt32(src4, usedSize);
         if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(errorType);
         }
     }
     return(errorType);
 }
示例#9
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSPKG_SEND_GUILD_MAIL_REQ.CURRVERSION < cutVer)
            {
                cutVer = CSPKG_SEND_GUILD_MAIL_REQ.CURRVERSION;
            }
            if (CSPKG_SEND_GUILD_MAIL_REQ.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            int usedSize = destBuf.getUsedSize();

            TdrError.ErrorType errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szSubject);

            if (num >= 128)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szSubject, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szContent);

            if (num2 >= 600)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szContent, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#10
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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);
            }
            int pos = destBuf.getUsedSize();

            type = destBuf.reserve(4);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int num2  = destBuf.getUsedSize();
                int count = TdrTypeUtil.cstrlen(this.szSubject);
                if (count >= 0x80)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szSubject, count);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num4 = destBuf.getUsedSize() - num2;
                type = destBuf.writeUInt32((uint)num4, pos);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num5 = destBuf.getUsedSize();
                type = destBuf.reserve(4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num6 = destBuf.getUsedSize();
                int num7 = TdrTypeUtil.cstrlen(this.szContent);
                if (num7 >= 600)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szContent, num7);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num8 = destBuf.getUsedSize() - num6;
                type = destBuf.writeUInt32((uint)num8, num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
            }
            return(type);
        }
示例#11
0
        public TdrError.ErrorType packTLV(ref TdrWriteBuf destBuf, bool useVarInt)
        {
            uint src = TdrTLV.makeTag(1, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_LENGTH_DELIMITED);

            TdrError.ErrorType errorType = destBuf.writeVarUInt32(src);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num = TdrTypeUtil.cstrlen(this.szRequestMethod);

            if (num >= 32)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szRequestMethod, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize - 4;

            errorType = destBuf.writeInt32(src2, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint src3 = TdrTLV.makeTag(2, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_LENGTH_DELIMITED);

            errorType = destBuf.writeVarUInt32(src3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num2 = TdrTypeUtil.cstrlen(this.szRequestUri);

            if (num2 >= 1024)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szRequestUri, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src4 = destBuf.getUsedSize() - usedSize2 - 4;

            errorType = destBuf.writeInt32(src4, usedSize2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint src5 = TdrTLV.makeTag(3, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_LENGTH_DELIMITED);

            errorType = destBuf.writeVarUInt32(src5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num3 = TdrTypeUtil.cstrlen(this.szHttpVersion);

            if (num3 >= 32)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szHttpVersion, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src6 = destBuf.getUsedSize() - usedSize3 - 4;

            errorType = destBuf.writeInt32(src6, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#12
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_TGWINFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_TGWINFO.CURRVERSION;
            }
            if (COMDT_TGWINFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt8(this.bIsUDP);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt16(this.wVPort);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt16(this.wEchoPort);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szRelayUrl);

            if (num >= 128)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szRelayUrl, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwVipCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (30u < this.dwVipCnt)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            if ((long)this.astVipInfo.Length < (long)((ulong)this.dwVipCnt))
            {
                return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
            }
            int num2 = 0;

            while ((long)num2 < (long)((ulong)this.dwVipCnt))
            {
                errorType = this.astVipInfo[num2].pack(ref destBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
                num2++;
            }
            return(errorType);
        }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_GUILD_RECRUIT_INFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_GUILD_RECRUIT_INFO.CURRVERSION;
            }
            if (COMDT_GUILD_RECRUIT_INFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt64(this.ullSenderUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bSenderLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt64(this.ullGuildID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwSendTime);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szGuildName);

            if (num >= 32)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szGuildName, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szSendName);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szSendName, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwSenderHeadID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize5 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize6 = destBuf.getUsedSize();
            int num3      = TdrTypeUtil.cstrlen(this.szSenderHeadUrl);

            if (num3 >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szSenderHeadUrl, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src3 = destBuf.getUsedSize() - usedSize6;

            errorType = destBuf.writeUInt32((uint)src3, usedSize5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bLimitGrade);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bLimitLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#14
0
 public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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 = this.stBriefInfo.pack(ref destBuf, cutVer);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = destBuf.writeUInt64(this.ullBuildTime);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwGuildMoney);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwActive);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwCoinPool);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwMaintainTime);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwElectionTime);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (150 < this.stBriefInfo.bMemberNum)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         if (this.astMemberInfo.Length < this.stBriefInfo.bMemberNum)
         {
             return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
         }
         for (int i = 0; i < this.stBriefInfo.bMemberNum; i++)
         {
             type = this.astMemberInfo[i].pack(ref destBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         type = destBuf.writeUInt8(this.bBuildingCnt);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (10 < this.bBuildingCnt)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         if (this.astBuildingInfo.Length < this.bBuildingCnt)
         {
             return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
         }
         for (int j = 0; j < this.bBuildingCnt; j++)
         {
             type = this.astBuildingInfo[j].pack(ref destBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         type = destBuf.writeUInt8(this.bSelfRecommendCnt);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (2 < this.bSelfRecommendCnt)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         if (this.astSelfRecommendInfo.Length < this.bSelfRecommendCnt)
         {
             return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
         }
         for (int k = 0; k < this.bSelfRecommendCnt; k++)
         {
             type = this.astSelfRecommendInfo[k].pack(ref destBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         type = this.stRankInfo.pack(ref destBuf, cutVer);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (VERSION_dwChangeNameCnt <= cutVer)
         {
             type = destBuf.writeUInt32(this.dwChangeNameCnt);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         if (VERSION_dwStar <= cutVer)
         {
             type = destBuf.writeUInt32(this.dwStar);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         if (VERSION_dwGroupGuildID <= cutVer)
         {
             type = destBuf.writeUInt32(this.dwGroupGuildID);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         if (VERSION_szGroupOpenID > cutVer)
         {
             return(type);
         }
         int pos = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num5  = destBuf.getUsedSize();
         int count = TdrTypeUtil.cstrlen(this.szGroupOpenID);
         if (count >= 0x80)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szGroupOpenID, count);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num7 = destBuf.getUsedSize() - num5;
         type = destBuf.writeUInt32((uint)num7, pos);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     return(type);
 }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_TRANS_CONTEXT_OF_FIRE_MEMBER.CURRVERSION < cutVer)
            {
                cutVer = COMDT_TRANS_CONTEXT_OF_FIRE_MEMBER.CURRVERSION;
            }
            if (COMDT_TRANS_CONTEXT_OF_FIRE_MEMBER.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt64(this.ullGuildID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt64(this.ullOperUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwGameEntity);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt64(this.ullFireUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szName, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwHeadID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szHeadUrl);

            if (num2 >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szHeadUrl, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwAbility);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bPosition);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwConstruct);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwWeekConstruct);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwTotalConstruct);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwCurrActive);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwWeekActive);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bFireCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bDonateCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwDonateNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwWeekDividend);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwJoinTime);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stRankInfo.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bFlag);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwFireGameEntity);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stVip.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLastLoginTime);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwClassOfRank);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwScoreOfRank);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stGuildMatchInfo.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#16
0
 public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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 = this.stSnsFrindInfo.pack(ref destBuf, cutVer);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         int pos = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num2  = destBuf.getUsedSize();
         int count = TdrTypeUtil.cstrlen(this.szNickName);
         if (count >= 0x100)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szNickName, count);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num4 = destBuf.getUsedSize() - num2;
         type = destBuf.writeUInt32((uint)num4, pos);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bGameState);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwGameStartTime);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwDonateTime);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bVideoState);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         long bVideoState = this.bVideoState;
         type = this.stGameInfo.pack(bVideoState, ref destBuf, cutVer);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     return(type);
 }
        public TdrError.ErrorType packTLV(ref TdrWriteBuf destBuf, bool useVarInt)
        {
            uint src = TdrTLV.makeTag(1, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_LENGTH_DELIMITED);

            TdrError.ErrorType errorType = destBuf.writeVarUInt32(src);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num = TdrTypeUtil.cstrlen(this.szHeaderName);

            if (num >= 80)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szHeaderName, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize - 4;

            errorType = destBuf.writeInt32(src2, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint src3 = TdrTLV.makeTag(2, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_LENGTH_DELIMITED);

            errorType = destBuf.writeVarUInt32(src3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num2 = TdrTypeUtil.cstrlen(this.szHeaderContent);

            if (num2 >= 260)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szHeaderContent, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src4 = destBuf.getUsedSize() - usedSize2 - 4;

            errorType = destBuf.writeInt32(src4, usedSize2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#18
0
        public TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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);
            }
            int pos = destBuf.getUsedSize();

            type = destBuf.reserve(4);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int num2  = destBuf.getUsedSize();
                int count = TdrTypeUtil.cstrlen(this.szOpenid);
                if (count >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szOpenid, count);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num4 = destBuf.getUsedSize() - num2;
                type = destBuf.writeUInt32((uint)num4, pos);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num5 = destBuf.getUsedSize();
                type = destBuf.reserve(4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num6 = destBuf.getUsedSize();
                int num7 = TdrTypeUtil.cstrlen(this.szNickname);
                if (num7 >= 0x80)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szNickname, num7);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num8 = destBuf.getUsedSize() - num6;
                type = destBuf.writeUInt32((uint)num8, num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num9 = destBuf.getUsedSize();
                type = destBuf.reserve(4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num10 = destBuf.getUsedSize();
                int num11 = TdrTypeUtil.cstrlen(this.szPotraitURL);
                if (num11 >= 0x200)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szPotraitURL, num11);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num12 = destBuf.getUsedSize() - num10;
                type = destBuf.writeUInt32((uint)num12, num9);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeInt32(this.iGender);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeInt32(this.iExtraSize);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (0 > this.iExtraSize)
                {
                    return(TdrError.ErrorType.TDR_ERR_MINUS_REFER_VALUE);
                }
                if (0x200 < this.iExtraSize)
                {
                    return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
                }
                if (this.szExtraInfo.Length < this.iExtraSize)
                {
                    return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
                }
                for (int i = 0; i < this.iExtraSize; i++)
                {
                    type = destBuf.writeInt8(this.szExtraInfo[i]);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
            }
            return(type);
        }
示例#19
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSDT_CHEAT_SENDMAIL.CURRVERSION < cutVer)
            {
                cutVer = CSDT_CHEAT_SENDMAIL.CURRVERSION;
            }
            if (CSDT_CHEAT_SENDMAIL.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt8(this.bMailType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bMailsubType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szTo);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szTo, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt64(this.ullToUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwToLogicWorld);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bSubjectLen);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (128 < this.bSubjectLen)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            if (this.szSubject.Length < (int)this.bSubjectLen)
            {
                return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
            }
            for (int i = 0; i < (int)this.bSubjectLen; i++)
            {
                errorType = destBuf.writeInt8(this.szSubject[i]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            errorType = destBuf.writeUInt16(this.wContentLen);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (600 < this.wContentLen)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            if (this.szContent.Length < (int)this.wContentLen)
            {
                return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
            }
            for (int j = 0; j < (int)this.wContentLen; j++)
            {
                errorType = destBuf.writeInt8(this.szContent[j]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            errorType = destBuf.writeUInt8(this.bAccessCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (10 < this.bAccessCnt)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            if (this.astAccess.Length < (int)this.bAccessCnt)
            {
                return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
            }
            for (int k = 0; k < (int)this.bAccessCnt; k++)
            {
                errorType = this.astAccess[k].pack(ref destBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            return(errorType);
        }
示例#20
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSPKG_CLT_PERFORMANCE.CURRVERSION < cutVer)
            {
                cutVer = CSPKG_CLT_PERFORMANCE.CURRVERSION;
            }
            if (CSPKG_CLT_PERFORMANCE.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeInt32(this.iMapID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iPlayerCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt8(this.chModelLOD);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt8(this.chParticleLOD);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt8(this.chCameraHeight);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt8(this.chEnableOutline);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iFps10PercentNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iFps18PercentNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iAveFps);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iPingAverage);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iPingVariance);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szDeviceModel);

            if (num >= 128)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szDeviceModel, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szGPUName);

            if (num2 >= 128)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szGPUName, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iCpuCoreNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iSysMemorySize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iAvailMemory);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iIsTongCai);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iIsSpeedUp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_APOLLO_PAY_BUILDCRT.CURRVERSION < cutVer)
            {
                cutVer = COMDT_APOLLO_PAY_BUILDCRT.CURRVERSION;
            }
            if (COMDT_APOLLO_PAY_BUILDCRT.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = this.stCreatePlayer.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szName);

            if (num >= 32)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szName, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwHeadID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szNotice);

            if (num2 >= 128)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szNotice, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bIsFriendOnly);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#22
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSDT_ACNT_DETAIL_INFO.CURRVERSION < cutVer)
            {
                cutVer = CSDT_ACNT_DETAIL_INFO.CURRVERSION;
            }
            if (CSDT_ACNT_DETAIL_INFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt64(this.ullUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szAcntName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szAcntName, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szOpenID);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szOpenID, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iLogicWorldId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bIsOnline);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLastLoginTime);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize5 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize6 = destBuf.getUsedSize();
            int num3      = TdrTypeUtil.cstrlen(this.szOpenUrl);

            if (num3 >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szOpenUrl, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src3 = destBuf.getUsedSize() - usedSize6;

            errorType = destBuf.writeUInt32((uint)src3, usedSize5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwExp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwPower);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwPvpLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwPvpExp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bGradeOfRank);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bMaxGradeOfRank);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwWangZheCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stGameVip.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stStatistic.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stGuildInfo.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stBanTime.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stMostUsedHero.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (CSDT_ACNT_DETAIL_INFO.VERSION_dwQQVIPMask <= cutVer)
            {
                errorType = destBuf.writeUInt32(this.dwQQVIPMask);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            if (CSDT_ACNT_DETAIL_INFO.VERSION_bPrivilege <= cutVer)
            {
                errorType = destBuf.writeUInt8(this.bPrivilege);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            if (CSDT_ACNT_DETAIL_INFO.VERSION_bGender <= cutVer)
            {
                errorType = destBuf.writeUInt8(this.bGender);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            errorType = this.stHonorInfo.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwCreditValue);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stRankInfo.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwCurClassOfRank);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (CSDT_ACNT_DETAIL_INFO.VERSION_stLikeNum <= cutVer)
            {
                errorType = this.stLikeNum.pack(ref destBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            errorType = destBuf.writeUInt32(this.dwAchieveMentScore);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            for (int i = 0; i < 3; i++)
            {
                errorType = this.astShowAchievement[i].pack(ref destBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            int usedSize7 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize8 = destBuf.getUsedSize();
            int num4      = TdrTypeUtil.cstrlen(this.szSignatureInfo);

            if (num4 >= 128)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szSignatureInfo, num4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src4 = destBuf.getUsedSize() - usedSize8;

            errorType = destBuf.writeUInt32((uint)src4, usedSize7);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwRefuseFriendBits);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stAcntMasterInfo.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iSumDelCreditValue);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwMostDelCreditType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt64(this.ullUserPrivacyBits);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stFriendCard.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#23
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSDT_GUILDMATCH_SIGNUPINFO.CURRVERSION < cutVer)
            {
                cutVer = CSDT_GUILDMATCH_SIGNUPINFO.CURRVERSION;
            }
            if (CSDT_GUILDMATCH_SIGNUPINFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt64(this.ullUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bPos1);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bPos2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szBeiZhu);

            if (num >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szBeiZhu, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bHeroNum);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (3 < this.bHeroNum)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            if (this.astHeroInfo.Length < (int)this.bHeroNum)
            {
                return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
            }
            for (int i = 0; i < (int)this.bHeroNum; i++)
            {
                errorType = this.astHeroInfo[i].pack(ref destBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            return(errorType);
        }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_ARENA_MEMBER_OF_ACNT.CURRVERSION < cutVer)
            {
                cutVer = COMDT_ARENA_MEMBER_OF_ACNT.CURRVERSION;
            }
            if (COMDT_ARENA_MEMBER_OF_ACNT.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt64(this.ullUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szName, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwForceValue);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (COMDT_ARENA_MEMBER_OF_ACNT.VERSION_szHeadUrl <= cutVer)
            {
                int usedSize3 = destBuf.getUsedSize();
                errorType = destBuf.reserve(4);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
                int usedSize4 = destBuf.getUsedSize();
                int num2      = TdrTypeUtil.cstrlen(this.szHeadUrl);
                if (num2 >= 256)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                errorType = destBuf.writeCString(this.szHeadUrl, num2);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
                errorType = destBuf.writeUInt8(0);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
                int src2 = destBuf.getUsedSize() - usedSize4;
                errorType = destBuf.writeUInt32((uint)src2, usedSize3);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            errorType = destBuf.writeUInt32(this.dwPVPLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stBattleHero.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (COMDT_ARENA_MEMBER_OF_ACNT.VERSION_stVip <= cutVer)
            {
                errorType = this.stVip.pack(ref destBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            return(errorType);
        }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_TRANS_CONTEXT_OF_TRANS_REGISTER_INFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_TRANS_CONTEXT_OF_TRANS_REGISTER_INFO.CURRVERSION;
            }
            if (COMDT_TRANS_CONTEXT_OF_TRANS_REGISTER_INFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt64(this.ullVisitorUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwAcntSeq);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szRegisterName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szRegisterName, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szOpenID);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szOpenID, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iDbVersion);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bFailKickAcnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#26
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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);
            }
            int pos = destBuf.getUsedSize();

            type = destBuf.reserve(4);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int num2  = destBuf.getUsedSize();
                int count = TdrTypeUtil.cstrlen(this.szGuildName);
                if (count >= 0x20)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szGuildName, count);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num4 = destBuf.getUsedSize() - num2;
                type = destBuf.writeUInt32((uint)num4, pos);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt64(this.ullBeInviteUid);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeInt32(this.iLogicWorldID);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(this.bNewFlag);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt32(this.dwInviteTime);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(this.bErrorCode);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
            }
            return(type);
        }
示例#27
0
        public TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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);
            }
            int pos = destBuf.getUsedSize();

            type = destBuf.reserve(4);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int num2  = destBuf.getUsedSize();
                int count = TdrTypeUtil.cstrlen(this.szAllowedLowVer);
                if (count >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szAllowedLowVer, count);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num4 = destBuf.getUsedSize() - num2;
                type = destBuf.writeUInt32((uint)num4, pos);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num5 = destBuf.getUsedSize();
                type = destBuf.reserve(4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num6 = destBuf.getUsedSize();
                int num7 = TdrTypeUtil.cstrlen(this.szCurrentVer);
                if (num7 >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szCurrentVer, num7);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num8 = destBuf.getUsedSize() - num6;
                type = destBuf.writeUInt32((uint)num8, num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt64(this.ullAllowedLowVerUint);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt64(this.ullCurrentVerUint);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeInt32(this.iReviewVerCount);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (0 > this.iReviewVerCount)
                {
                    return(TdrError.ErrorType.TDR_ERR_MINUS_REFER_VALUE);
                }
                if (10 < this.iReviewVerCount)
                {
                    return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
                }
                if (this.aszReviewVer.Length < this.iReviewVerCount)
                {
                    return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
                }
                for (int i = 0; i < this.iReviewVerCount; i++)
                {
                    int num10 = destBuf.getUsedSize();
                    type = destBuf.reserve(4);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    int num11 = destBuf.getUsedSize();
                    int num12 = TdrTypeUtil.cstrlen(this.aszReviewVer[i]);
                    if (num12 >= 0x40)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    type = destBuf.writeCString(this.aszReviewVer[i], num12);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = destBuf.writeUInt8(0);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    int num13 = destBuf.getUsedSize() - num11;
                    type = destBuf.writeUInt32((uint)num13, num10);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                if (0 > this.iReviewVerCount)
                {
                    return(TdrError.ErrorType.TDR_ERR_MINUS_REFER_VALUE);
                }
                if (10 < this.iReviewVerCount)
                {
                    return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
                }
                if (this.ReviewVerUint.Length < this.iReviewVerCount)
                {
                    return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
                }
                for (int j = 0; j < this.iReviewVerCount; j++)
                {
                    type = destBuf.writeUInt64(this.ReviewVerUint[j]);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
            }
            return(type);
        }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_CLIENT_INFO_DATA.CURRVERSION < cutVer)
            {
                cutVer = COMDT_CLIENT_INFO_DATA.CURRVERSION;
            }
            if (COMDT_CLIENT_INFO_DATA.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            int usedSize = destBuf.getUsedSize();

            TdrError.ErrorType errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szSystemSoftware);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szSystemSoftware, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize3 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize4 = destBuf.getUsedSize();
            int num2      = TdrTypeUtil.cstrlen(this.szSystemHardware);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szSystemHardware, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src2 = destBuf.getUsedSize() - usedSize4;

            errorType = destBuf.writeUInt32((uint)src2, usedSize3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize5 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize6 = destBuf.getUsedSize();
            int num3      = TdrTypeUtil.cstrlen(this.szTelecomOper);

            if (num3 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szTelecomOper, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src3 = destBuf.getUsedSize() - usedSize6;

            errorType = destBuf.writeUInt32((uint)src3, usedSize5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize7 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize8 = destBuf.getUsedSize();
            int num4      = TdrTypeUtil.cstrlen(this.szNetwork);

            if (num4 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szNetwork, num4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src4 = destBuf.getUsedSize() - usedSize8;

            errorType = destBuf.writeUInt32((uint)src4, usedSize7);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iLoginChannel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize9 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize10 = destBuf.getUsedSize();
            int num5       = TdrTypeUtil.cstrlen(this.szClientVersion);

            if (num5 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szClientVersion, num5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src5 = destBuf.getUsedSize() - usedSize10;

            errorType = destBuf.writeUInt32((uint)src5, usedSize9);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iMemorySize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize11 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize12 = destBuf.getUsedSize();
            int num6       = TdrTypeUtil.cstrlen(this.szCltBuildNumber);

            if (num6 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szCltBuildNumber, num6);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src6 = destBuf.getUsedSize() - usedSize12;

            errorType = destBuf.writeUInt32((uint)src6, usedSize11);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize13 = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize14 = destBuf.getUsedSize();
            int num7       = TdrTypeUtil.cstrlen(this.szCltSvnVersion);

            if (num7 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szCltSvnVersion, num7);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src7 = destBuf.getUsedSize() - usedSize14;

            errorType = destBuf.writeUInt32((uint)src7, usedSize13);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#29
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_TRANS_CONTEXT_OF_REMOVEMASTER_REQ.CURRVERSION < cutVer)
            {
                cutVer = COMDT_TRANS_CONTEXT_OF_REMOVEMASTER_REQ.CURRVERSION;
            }
            if (COMDT_TRANS_CONTEXT_OF_REMOVEMASTER_REQ.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt8(this.bRemoveType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bSubStudentType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stMasterUniq.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stStudentUniq.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bDestAcntOnline);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwDestAcntGameSvrEntity);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwDestAcntPvpLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwDestLastLoginTime);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize = destBuf.getUsedSize();

            errorType = destBuf.reserve(4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int usedSize2 = destBuf.getUsedSize();
            int num       = TdrTypeUtil.cstrlen(this.szDestOpenID);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szDestOpenID, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(0);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int src = destBuf.getUsedSize() - usedSize2;

            errorType = destBuf.writeUInt32((uint)src, usedSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bTBMasterExist);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
示例#30
0
 public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, 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 = destBuf.writeInt32(this.iComplaintLogicWorldID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = destBuf.writeUInt64(this.ullComplaintUserUid);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int pos = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num2  = destBuf.getUsedSize();
         int count = TdrTypeUtil.cstrlen(this.szComplaintUserOpenId);
         if (count >= 0x40)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szComplaintUserOpenId, count);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num4 = destBuf.getUsedSize() - num2;
         type = destBuf.writeUInt32((uint)num4, pos);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwClientStartTime);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeInt32(this.iBattlePlayerNumber);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num5 = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num6 = destBuf.getUsedSize();
         int num7 = TdrTypeUtil.cstrlen(this.szComplaintPlayerName);
         if (num7 >= 0x40)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szComplaintPlayerName, num7);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num8 = destBuf.getUsedSize() - num6;
         type = destBuf.writeUInt32((uint)num8, num5);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeInt32(this.iComplaintPlayerCamp);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwComplaintReason);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num9 = destBuf.getUsedSize();
         type = destBuf.reserve(4);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num10 = destBuf.getUsedSize();
         int num11 = TdrTypeUtil.cstrlen(this.szComplaintRemark);
         if (num11 >= 0x100)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szComplaintRemark, num11);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(0);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         int num12 = destBuf.getUsedSize() - num10;
         type = destBuf.writeUInt32((uint)num12, num9);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     return(type);
 }