Exemple #1
0
        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);
            }
            errorType = destBuf.writeUInt32(this.dwClientIP);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
Exemple #2
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_HEROLABEL.CURRVERSION < cutVer)
            {
                cutVer = COMDT_HEROLABEL.CURRVERSION;
            }
            if (COMDT_HEROLABEL.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.dwHeroID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwGrade);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwClass);
            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.szRoleName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szRoleName, 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.szHealUrl);

            if (num2 >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szHealUrl, 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);
        }
Exemple #3
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.writeUInt64(this.ullGuildID);
     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.writeUInt64(this.ullChairMan);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwGameEntity);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwLogicWorldID);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bCount);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (8 < this.bCount)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         if (this.astPositionChg.Length < this.bCount)
         {
             return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
         }
         for (int i = 0; i < this.bCount; i++)
         {
             type = this.astPositionChg[i].pack(ref destBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         type = destBuf.writeUInt8(this.bStep);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt8(this.bType);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     return(type);
 }
Exemple #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);
            }
            int pos = destBuf.getUsedSize();

            type = destBuf.reserve(4);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int num2  = destBuf.getUsedSize();
                int count = TdrTypeUtil.cstrlen(this.szSystemHardware);
                if (count >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szSystemHardware, 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.szTelecomOper);
                if (num7 >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szTelecomOper, 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.szNetwork);
                if (num11 >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szNetwork, 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.iLoginChannel);
                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.szClientVersion);
                if (num15 >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szClientVersion, 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);
                }
                type = destBuf.writeInt32(this.iMemorySize);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num17 = destBuf.getUsedSize();
                type = destBuf.reserve(4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num18 = destBuf.getUsedSize();
                int num19 = TdrTypeUtil.cstrlen(this.szCltBuildNumber);
                if (num19 >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szCltBuildNumber, num19);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num20 = destBuf.getUsedSize() - num18;
                type = destBuf.writeUInt32((uint)num20, num17);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num21 = destBuf.getUsedSize();
                type = destBuf.reserve(4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num22 = destBuf.getUsedSize();
                int num23 = TdrTypeUtil.cstrlen(this.szCltSvnVersion);
                if (num23 >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szCltSvnVersion, num23);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeUInt8(0);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num24 = destBuf.getUsedSize() - num22;
                type = destBuf.writeUInt32((uint)num24, num21);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
            }
            return(type);
        }
Exemple #5
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_TRANS_CONTEXT_OF_CHANGE_PLAYER_NAME.CURRVERSION < cutVer)
            {
                cutVer = COMDT_TRANS_CONTEXT_OF_CHANGE_PLAYER_NAME.CURRVERSION;
            }
            if (COMDT_TRANS_CONTEXT_OF_CHANGE_PLAYER_NAME.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.szOrgName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szOrgName, 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.szNewName);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szNewName, 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.bNeedDelRegister);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iErrorCode);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
Exemple #6
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSPKG_GUILD_MATCH_SIGNUP_REQ.CURRVERSION < cutVer)
            {
                cutVer = CSPKG_GUILD_MATCH_SIGNUP_REQ.CURRVERSION;
            }
            if (CSPKG_GUILD_MATCH_SIGNUP_REQ.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.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);
        }
Exemple #7
0
 public TdrError.ErrorType packTLV(ref TdrWriteBuf destBuf, bool useVarInt)
 {
     TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
     if (useVarInt)
     {
         uint src = TdrTLV.makeTag(1, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_VARINT);
         type = destBuf.writeVarUInt32(src);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeVarUInt32(this.dwDataLen);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     else
     {
         uint num2 = TdrTLV.makeTag(1, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_4_BYTE);
         type = destBuf.writeVarUInt32(num2);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwDataLen);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
     }
     if (this.dwDataLen > 0x1fa0)
     {
         return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
     }
     if (this.dwDataLen > 0)
     {
         uint num3 = TdrTLV.makeTag(2, TdrTLV.TdrTLVTypeId.TDR_TYPE_ID_LENGTH_DELIMITED);
         type = destBuf.writeVarUInt32(num3);
         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);
         }
         for (int i = 0; i < this.dwDataLen; i++)
         {
             type = destBuf.writeUInt8(this.szData[i]);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
         int num6 = (destBuf.getUsedSize() - pos) - 4;
         type = destBuf.writeInt32(num6, 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_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);
        }
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || SCPKG_CMD_GAIN_CHEST.CURRVERSION < cutVer)
            {
                cutVer = SCPKG_CMD_GAIN_CHEST.CURRVERSION;
            }
            if (SCPKG_CMD_GAIN_CHEST.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeInt32(this.iActId);
            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.szGainChestId);

            if (num >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szGainChestId, 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.writeUInt16(this.wTitleLen);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (128 < this.wTitleLen)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            if (this.szChestTitle.Length < (int)this.wTitleLen)
            {
                return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
            }
            for (int i = 0; i < (int)this.wTitleLen; i++)
            {
                errorType = destBuf.writeInt8(this.szChestTitle[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 (256 < this.wContentLen)
            {
                return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
            }
            if (this.szChestContent.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.szChestContent[j]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            errorType = destBuf.writeInt32(this.iResult);
            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_OPT_PAY.CURRVERSION < cutVer)
            {
                cutVer = COMDT_APOLLO_OPT_PAY.CURRVERSION;
            }
            if (COMDT_APOLLO_OPT_PAY.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt32(this.dwPayFlag);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwDiamondCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwCouponsCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stEventInfo.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.szBillno);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szBillno, 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.bRetryCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt16(this.wPayType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            long selector = (long)this.wPayType;

            errorType = this.stPayInfo.pack(selector, ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
Exemple #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.szHttpVersion);

            if (num >= 32)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szHttpVersion, 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.szStatusCode);

            if (num2 >= 16)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szStatusCode, 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.szReasonPhrase);

            if (num3 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szReasonPhrase, 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);
        }
Exemple #12
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_TRANS_CONTEXT_OF_APPROVE_JOIN_GUILD.CURRVERSION < cutVer)
            {
                cutVer = COMDT_TRANS_CONTEXT_OF_APPROVE_JOIN_GUILD.CURRVERSION;
            }
            if (COMDT_TRANS_CONTEXT_OF_APPROVE_JOIN_GUILD.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = this.stApplyPlayer.pack(ref destBuf, cutVer);
            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.iGuildLogicWorldID);
            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);
            }
            errorType = destBuf.writeInt32(this.iRollbackFlag);
            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_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);
        }
Exemple #14
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_FAKEACNT_DETAIL.CURRVERSION < cutVer)
            {
                cutVer = COMDT_FAKEACNT_DETAIL.CURRVERSION;
            }
            if (COMDT_FAKEACNT_DETAIL.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.writeUInt32(this.dwAcntPvpLevel);
            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.szUserName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szUserName, 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.szUserHeadUrl);

            if (num2 >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szUserHeadUrl, 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.writeUInt64(this.ullDyeSeq);
            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_PLAYERINFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_PLAYERINFO.CURRVERSION;
            }
            if (COMDT_PLAYERINFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeUInt8(this.bObjCamp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bObjType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bPosOfCamp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwObjId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLevel);
            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);
            }
            long selector = (long)this.bObjType;

            errorType = this.stDetail.pack(selector, ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            for (int i = 0; i < 3; i++)
            {
                errorType = this.astChoiceHero[i].pack(ref destBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            return(errorType);
        }
Exemple #16
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSDT_CAMPPLAYERINFO.CURRVERSION < cutVer)
            {
                cutVer = CSDT_CAMPPLAYERINFO.CURRVERSION;
            }
            if (CSDT_CAMPPLAYERINFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = this.stPlayerInfo.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bIsGM);
            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.szOpenID);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szOpenID, 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.dwGradeOfRank);
            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.dwRandomHeroCnt);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stUsableHero.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stRecentUsedHero.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = this.stIntimacyRelation.pack(ref destBuf, cutVer);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
Exemple #17
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.szOrgName);
                if (count >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szOrgName, 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.szNewName);
                if (num7 >= 0x40)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                }
                type = destBuf.writeCString(this.szNewName, 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.writeUInt8(this.bNeedDelRegister);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = destBuf.writeInt32(this.iErrorCode);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
            }
            return(type);
        }
Exemple #18
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_SNS_FRIEND_INFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_SNS_FRIEND_INFO.CURRVERSION;
            }
            if (COMDT_SNS_FRIEND_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.szNickName);

            if (num >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szNickName, 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.szRoleName);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szRoleName, 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.szHeadUrl);

            if (num3 >= 256)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szHeadUrl, 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.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.writeUInt32(this.dwLvl);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwPvpLvl);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwLastLoginTime);
            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_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.writeInt32(this.iGuildLogicWorldID);
            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.writeUInt64(this.ullFireUid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iFireLogicWorldID);
            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);
            }
            errorType = this.stRankShowGrade.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)
 {
     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 (100 < 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);
 }
Exemple #21
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.writeUInt64(this.ullGuildID);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = destBuf.writeUInt64(this.ullInviteUid);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = this.stBeInvitePlayer.pack(ref destBuf, cutVer);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwGameEntity);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwLogicWorldID);
         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.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);
         }
     }
     return(type);
 }
Exemple #22
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.writeUInt8(this.bIsUDP);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = destBuf.writeUInt16(this.wVPort);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt16(this.wEchoPort);
         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.szRelayUrl);
         if (count >= 0x80)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szRelayUrl, 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.dwVipCnt);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         if (8 < this.dwVipCnt)
         {
             return(TdrError.ErrorType.TDR_ERR_REFER_SURPASS_COUNT);
         }
         if (this.astVipInfo.Length < this.dwVipCnt)
         {
             return(TdrError.ErrorType.TDR_ERR_VAR_ARRAY_CONFLICT);
         }
         for (int i = 0; i < this.dwVipCnt; i++)
         {
             type = this.astVipInfo[i].pack(ref destBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
     }
     return(type);
 }
Exemple #23
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_IDIP_MAIL_INFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_IDIP_MAIL_INFO.CURRVERSION;
            }
            if (COMDT_IDIP_MAIL_INFO.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = 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.szFrom);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szFrom, 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.szTo);

            if (num2 >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szTo, 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.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);
        }
Exemple #24
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_INVITER_INFO.CURRVERSION < cutVer)
            {
                cutVer = COMDT_INVITER_INFO.CURRVERSION;
            }
            if (COMDT_INVITER_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);
            }
            errorType = destBuf.writeInt32(this.iGameEntity);
            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.dwLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwRelationMask);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bGradeOfRank);
            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.writeUInt8(this.bGender);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwHeadImgId);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
        public TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || PvpRivalInfo.CURRVERSION < cutVer)
            {
                cutVer = PvpRivalInfo.CURRVERSION;
            }
            if (PvpRivalInfo.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.szOpenid);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szOpenid, 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.szNickname);

            if (num2 >= 128)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szNickname, 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.szPotraitURL);

            if (num3 >= 512)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szPotraitURL, 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.iGender);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iExtraSize);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            if (0 > this.iExtraSize)
            {
                return(TdrError.ErrorType.TDR_ERR_MINUS_REFER_VALUE);
            }
            if (512 < 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++)
            {
                errorType = destBuf.writeInt8(this.szExtraInfo[i]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            return(errorType);
        }
Exemple #26
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || CSPKG_OFFINGRESTART_RSP.CURRVERSION < cutVer)
            {
                cutVer = CSPKG_OFFINGRESTART_RSP.CURRVERSION;
            }
            if (CSPKG_OFFINGRESTART_RSP.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = destBuf.writeInt32(this.iLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iCltAppVersion);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeInt32(this.iCltResVersion);
            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.szCltIMEI);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szCltIMEI, 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);
            }
            if (CSPKG_OFFINGRESTART_RSP.VERSION_bPrivilege <= cutVer)
            {
                errorType = destBuf.writeUInt8(this.bPrivilege);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            errorType = destBuf.writeUInt8(this.bNeedLoginRsp);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            return(errorType);
        }
Exemple #27
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.writeUInt64(this.ullUid);
     if (type == TdrError.ErrorType.TDR_NO_ERROR)
     {
         type = destBuf.writeInt32(this.iLogicWorldID);
         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.szName);
         if (count >= 0x40)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szName, 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.dwLevel);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwHeadID);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwAbility);
         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.szHeadUrl);
         if (num7 >= 0x100)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szHeadUrl, 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.szRecommendName);
         if (num11 >= 0x40)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szRecommendName, 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 = this.stVip.pack(ref destBuf, cutVer);
         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.writeUInt8(this.bAcntLevel);
     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.szAcntName);
         if (count >= 0x40)
         {
             return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
         }
         type = destBuf.writeCString(this.szAcntName, 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.bScore);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         type = destBuf.writeUInt32(this.dwWinCnt);
         if (type != TdrError.ErrorType.TDR_NO_ERROR)
         {
             return(type);
         }
         for (int i = 0; i < 3; i++)
         {
             type = this.astCommonUseHero[i].pack(ref destBuf, cutVer);
             if (type != TdrError.ErrorType.TDR_NO_ERROR)
             {
                 return(type);
             }
         }
     }
     return(type);
 }
Exemple #29
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 > 8096u)
     {
         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);
 }
Exemple #30
0
        public override TdrError.ErrorType pack(ref TdrWriteBuf destBuf, uint cutVer)
        {
            if (cutVer == 0u || COMDT_UID_CHANGE_POSITION.CURRVERSION < cutVer)
            {
                cutVer = COMDT_UID_CHANGE_POSITION.CURRVERSION;
            }
            if (COMDT_UID_CHANGE_POSITION.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.writeInt32(this.iLogicWorldID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bOrgPosition);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt8(this.bChgPosition);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = destBuf.writeUInt32(this.dwConstruct);
            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.szMemName);

            if (num >= 64)
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
            }
            errorType = destBuf.writeCString(this.szMemName, 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);
            }
            return(errorType);
        }