Beispiel #1
0
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            uint nValue  = 0u;
            uint nValue2 = 0u;

            srcBuf.disableEndian();
            if (cutVer == 0u || ResEquipInBattle.CURRVERSION < cutVer)
            {
                cutVer = ResEquipInBattle.CURRVERSION;
            }
            if (ResEquipInBattle.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt16(ref this.wID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt16(ref this.wEquipIDRemoteAtk);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num = 64;

            if (this.szName_ByteArray.GetLength(0) < num)
            {
                this.szName_ByteArray = new byte[ResEquipInBattle.LENGTH_szName];
            }
            errorType = srcBuf.readCString(ref this.szName_ByteArray, num);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bUsage);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt16(ref this.wGroup);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bNeedPunish);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num2 = 128;

            if (this.szIcon_ByteArray.GetLength(0) < num2)
            {
                this.szIcon_ByteArray = new byte[ResEquipInBattle.LENGTH_szIcon];
            }
            errorType = srcBuf.readCString(ref this.szIcon_ByteArray, num2);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType       = srcBuf.readUInt32(ref nValue);
            this.dwBuyPrice = nValue;
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType        = srcBuf.readUInt32(ref nValue2);
            this.dwSalePrice = nValue2;
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            for (int i = 0; i < 3; i++)
            {
                errorType = srcBuf.readUInt16(ref this.PreEquipID[i]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            int num3 = 64;

            if (this.szRequireEquip_ByteArray.GetLength(0) < num3)
            {
                this.szRequireEquip_ByteArray = new byte[ResEquipInBattle.LENGTH_szRequireEquip];
            }
            errorType = srcBuf.readCString(ref this.szRequireEquip_ByteArray, num3);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwPhyAttack);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwAttackSpeed);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCriticalHit);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwHealthSteal);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicAttack);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCDReduce);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicPoint);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicRecover);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwPhyDefence);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicDefence);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwHealthPoint);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwHealthRecover);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMoveSpeed);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwActiveSkillID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwActiveSkillGroupID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num4 = 256;

            if (this.szActiveSkillDes_ByteArray.GetLength(0) < num4)
            {
                this.szActiveSkillDes_ByteArray = new byte[ResEquipInBattle.LENGTH_szActiveSkillDes];
            }
            errorType = srcBuf.readCString(ref this.szActiveSkillDes_ByteArray, num4);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            for (int j = 0; j < 2; j++)
            {
                errorType = this.astPassiveSkill[j].load(ref srcBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            for (int k = 0; k < 3; k++)
            {
                errorType = this.astEffectCombine[k].load(ref srcBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            int num5 = 128;

            if (this.szDesc_ByteArray.GetLength(0) < num5)
            {
                this.szDesc_ByteArray = new byte[ResEquipInBattle.LENGTH_szDesc];
            }
            errorType = srcBuf.readCString(ref this.szDesc_ByteArray, num5);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            int num6 = 128;

            if (this.szExtraDesc_ByteArray.GetLength(0) < num6)
            {
                this.szExtraDesc_ByteArray = new byte[ResEquipInBattle.LENGTH_szExtraDesc];
            }
            errorType = srcBuf.readCString(ref this.szExtraDesc_ByteArray, num6);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bInvalid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsAttachEquip);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            this.TransferData();
            return(errorType);
        }
Beispiel #2
0
        public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            uint nValue  = 0u;
            uint nValue2 = 0u;

            if (cutVer == 0u || ResEquipInBattle.CURRVERSION < cutVer)
            {
                cutVer = ResEquipInBattle.CURRVERSION;
            }
            if (ResEquipInBattle.BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            TdrError.ErrorType errorType = srcBuf.readUInt16(ref this.wID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt16(ref this.wEquipIDRemoteAtk);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint num = 0u;

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

            if ((ulong)num != (ulong)((long)num2))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt8(ref this.bUsage);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bLevel);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bType);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt16(ref this.wGroup);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bNeedPunish);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint num3 = 0u;

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

            if ((ulong)num3 != (ulong)((long)num4))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType       = srcBuf.readUInt32(ref nValue);
            this.dwBuyPrice = nValue;
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType        = srcBuf.readUInt32(ref nValue2);
            this.dwSalePrice = nValue2;
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            for (int i = 0; i < 3; i++)
            {
                errorType = srcBuf.readUInt16(ref this.PreEquipID[i]);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            uint num5 = 0u;

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

            if ((ulong)num5 != (ulong)((long)num6))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt32(ref this.dwPhyAttack);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwAttackSpeed);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCriticalHit);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwHealthSteal);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicAttack);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwCDReduce);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicPoint);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicRecover);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwPhyDefence);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMagicDefence);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwHealthPoint);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwHealthRecover);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwMoveSpeed);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwActiveSkillID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt32(ref this.dwActiveSkillGroupID);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            uint num7 = 0u;

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

            if ((ulong)num7 != (ulong)((long)num8))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            for (int j = 0; j < 2; j++)
            {
                errorType = this.astPassiveSkill[j].unpack(ref srcBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            for (int k = 0; k < 3; k++)
            {
                errorType = this.astEffectCombine[k].unpack(ref srcBuf, cutVer);
                if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(errorType);
                }
            }
            uint num9 = 0u;

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

            if ((ulong)num9 != (ulong)((long)num10))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            uint num11 = 0u;

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

            if ((ulong)num11 != (ulong)((long)num12))
            {
                return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
            }
            errorType = srcBuf.readUInt8(ref this.bInvalid);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            errorType = srcBuf.readUInt8(ref this.bIsAttachEquip);
            if (errorType != TdrError.ErrorType.TDR_NO_ERROR)
            {
                return(errorType);
            }
            this.TransferData();
            return(errorType);
        }
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            int dest = 0;
            int num2 = 0;
            int num3 = 0;
            int num4 = 0;
            int num5 = 0;
            int num6 = 0;
            int num7 = 0;
            int num8 = 0;
            int num9 = 0;

            srcBuf.disableEndian();
            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            type = srcBuf.readInt32(ref this.iCfgID);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int count = 0x80;
                if (this.szSkillName_ByteArray.GetLength(0) < count)
                {
                    this.szSkillName_ByteArray = new byte[LENGTH_szSkillName];
                }
                type = srcBuf.readCString(ref this.szSkillName_ByteArray, count);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num11 = 0x200;
                if (this.szSkillDesc_ByteArray.GetLength(0) < num11)
                {
                    this.szSkillDesc_ByteArray = new byte[LENGTH_szSkillDesc];
                }
                type = srcBuf.readCString(ref this.szSkillDesc_ByteArray, num11);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bSkillType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num12 = 0x200;
                if (this.szSkillValueDesc_ByteArray.GetLength(0) < num12)
                {
                    this.szSkillValueDesc_ByteArray = new byte[LENGTH_szSkillValueDesc];
                }
                type = srcBuf.readCString(ref this.szSkillValueDesc_ByteArray, num12);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num13 = 0x100;
                if (this.szSkillUpTip_ByteArray.GetLength(0) < num13)
                {
                    this.szSkillUpTip_ByteArray = new byte[LENGTH_szSkillUpTip];
                }
                type = srcBuf.readCString(ref this.szSkillUpTip_ByteArray, num13);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num14 = 0x80;
                if (this.szIconPath_ByteArray.GetLength(0) < num14)
                {
                    this.szIconPath_ByteArray = new byte[LENGTH_szIconPath];
                }
                type = srcBuf.readCString(ref this.szIconPath_ByteArray, num14);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num15 = 0x80;
                if (this.szGuidePrefab_ByteArray.GetLength(0) < num15)
                {
                    this.szGuidePrefab_ByteArray = new byte[LENGTH_szGuidePrefab];
                }
                type = srcBuf.readCString(ref this.szGuidePrefab_ByteArray, num15);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num16 = 0x80;
                if (this.szEffectPrefab_ByteArray.GetLength(0) < num16)
                {
                    this.szEffectPrefab_ByteArray = new byte[LENGTH_szEffectPrefab];
                }
                type = srcBuf.readCString(ref this.szEffectPrefab_ByteArray, num16);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num17 = 0x80;
                if (this.szGuideWarnPrefab_ByteArray.GetLength(0) < num17)
                {
                    this.szGuideWarnPrefab_ByteArray = new byte[LENGTH_szGuideWarnPrefab];
                }
                type = srcBuf.readCString(ref this.szGuideWarnPrefab_ByteArray, num17);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num18 = 0x80;
                if (this.szEffectWarnPrefab_ByteArray.GetLength(0) < num18)
                {
                    this.szEffectWarnPrefab_ByteArray = new byte[LENGTH_szEffectWarnPrefab];
                }
                type = srcBuf.readCString(ref this.szEffectWarnPrefab_ByteArray, num18);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num19 = 0x80;
                if (this.szFixedPrefab_ByteArray.GetLength(0) < num19)
                {
                    this.szFixedPrefab_ByteArray = new byte[LENGTH_szFixedPrefab];
                }
                type = srcBuf.readCString(ref this.szFixedPrefab_ByteArray, num19);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num20 = 0x80;
                if (this.szFixedWarnPrefab_ByteArray.GetLength(0) < num20)
                {
                    this.szFixedWarnPrefab_ByteArray = new byte[LENGTH_szFixedWarnPrefab];
                }
                type = srcBuf.readCString(ref this.szFixedWarnPrefab_ByteArray, num20);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type           = srcBuf.readInt32(ref dest);
                this.iCoolDown = dest;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bImmediateUse);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bBIngnoreDisable);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num21 = 0x80;
                if (this.szPrefab_ByteArray.GetLength(0) < num21)
                {
                    this.szPrefab_ByteArray = new byte[LENGTH_szPrefab];
                }
                type = srcBuf.readCString(ref this.szPrefab_ByteArray, num21);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iSelfSkillCombine);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iTargetSkillCombine);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwRangeAppointType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref num2);
                this.iRangeRadius = num2;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwTgtIncludeSelf);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwTgtIncludeEnemy);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type             = srcBuf.readInt32(ref num3);
                this.iBaseDamage = num3;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref num4);
                this.iFixedDistance = num4;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref num5);
                this.iGuideDistance = num5;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref num6);
                this.iMaxAttackDistance = num6;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iGreaterAttackDistance);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iMaxSearchDistance);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwIsBullet);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iBulletID);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwSkillUseRule);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwSkillTargetRule);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwSkillTargetFilter);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iSkillCombatType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bIsCheckAntiCheat);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                for (int i = 0; i < 2; i++)
                {
                    type = srcBuf.readUInt32(ref this.SkillEffectType[i]);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                type = srcBuf.readUInt32(ref this.dwEnergyCostType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref this.iEnergyCostCalcType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type             = srcBuf.readInt32(ref num7);
                this.iEnergyCost = num7;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref num8);
                this.iEnergyCostGrowth = num8;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readInt32(ref num9);
                this.iCoolDownGrowth = num9;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bIsStunSkill);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                this.TransferData();
            }
            return(type);
        }
        public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            int dest = 0;
            int num2 = 0;
            int num3 = 0;
            int num4 = 0;
            int num5 = 0;
            int num6 = 0;
            int num7 = 0;
            int num8 = 0;
            int num9 = 0;

            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            type = srcBuf.readInt32(ref this.iCfgID);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                uint num10 = 0;
                type = srcBuf.readUInt32(ref num10);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num10 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num10 > this.szSkillName_ByteArray.GetLength(0))
                {
                    if (num10 > LENGTH_szSkillName)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szSkillName_ByteArray = new byte[num10];
                }
                if (1 > num10)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szSkillName_ByteArray, (int)num10);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szSkillName_ByteArray[((int)num10) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num11 = TdrTypeUtil.cstrlen(this.szSkillName_ByteArray) + 1;
                if (num10 != num11)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num12 = 0;
                type = srcBuf.readUInt32(ref num12);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num12 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num12 > this.szSkillDesc_ByteArray.GetLength(0))
                {
                    if (num12 > LENGTH_szSkillDesc)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szSkillDesc_ByteArray = new byte[num12];
                }
                if (1 > num12)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szSkillDesc_ByteArray, (int)num12);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szSkillDesc_ByteArray[((int)num12) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num13 = TdrTypeUtil.cstrlen(this.szSkillDesc_ByteArray) + 1;
                if (num12 != num13)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                type = srcBuf.readUInt8(ref this.bSkillType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                uint num14 = 0;
                type = srcBuf.readUInt32(ref num14);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num14 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num14 > this.szSkillValueDesc_ByteArray.GetLength(0))
                {
                    if (num14 > LENGTH_szSkillValueDesc)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szSkillValueDesc_ByteArray = new byte[num14];
                }
                if (1 > num14)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szSkillValueDesc_ByteArray, (int)num14);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szSkillValueDesc_ByteArray[((int)num14) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num15 = TdrTypeUtil.cstrlen(this.szSkillValueDesc_ByteArray) + 1;
                if (num14 != num15)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num16 = 0;
                type = srcBuf.readUInt32(ref num16);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num16 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num16 > this.szSkillUpTip_ByteArray.GetLength(0))
                {
                    if (num16 > LENGTH_szSkillUpTip)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szSkillUpTip_ByteArray = new byte[num16];
                }
                if (1 > num16)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szSkillUpTip_ByteArray, (int)num16);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szSkillUpTip_ByteArray[((int)num16) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num17 = TdrTypeUtil.cstrlen(this.szSkillUpTip_ByteArray) + 1;
                if (num16 != num17)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num18 = 0;
                type = srcBuf.readUInt32(ref num18);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num18 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num18 > this.szIconPath_ByteArray.GetLength(0))
                {
                    if (num18 > LENGTH_szIconPath)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szIconPath_ByteArray = new byte[num18];
                }
                if (1 > num18)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szIconPath_ByteArray, (int)num18);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szIconPath_ByteArray[((int)num18) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num19 = TdrTypeUtil.cstrlen(this.szIconPath_ByteArray) + 1;
                if (num18 != num19)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num20 = 0;
                type = srcBuf.readUInt32(ref num20);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num20 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num20 > this.szGuidePrefab_ByteArray.GetLength(0))
                {
                    if (num20 > LENGTH_szGuidePrefab)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szGuidePrefab_ByteArray = new byte[num20];
                }
                if (1 > num20)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szGuidePrefab_ByteArray, (int)num20);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szGuidePrefab_ByteArray[((int)num20) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num21 = TdrTypeUtil.cstrlen(this.szGuidePrefab_ByteArray) + 1;
                if (num20 != num21)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num22 = 0;
                type = srcBuf.readUInt32(ref num22);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num22 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num22 > this.szEffectPrefab_ByteArray.GetLength(0))
                {
                    if (num22 > LENGTH_szEffectPrefab)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szEffectPrefab_ByteArray = new byte[num22];
                }
                if (1 > num22)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szEffectPrefab_ByteArray, (int)num22);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szEffectPrefab_ByteArray[((int)num22) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num23 = TdrTypeUtil.cstrlen(this.szEffectPrefab_ByteArray) + 1;
                if (num22 != num23)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num24 = 0;
                type = srcBuf.readUInt32(ref num24);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num24 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num24 > this.szGuideWarnPrefab_ByteArray.GetLength(0))
                {
                    if (num24 > LENGTH_szGuideWarnPrefab)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szGuideWarnPrefab_ByteArray = new byte[num24];
                }
                if (1 > num24)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szGuideWarnPrefab_ByteArray, (int)num24);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szGuideWarnPrefab_ByteArray[((int)num24) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num25 = TdrTypeUtil.cstrlen(this.szGuideWarnPrefab_ByteArray) + 1;
                if (num24 != num25)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num26 = 0;
                type = srcBuf.readUInt32(ref num26);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num26 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num26 > this.szEffectWarnPrefab_ByteArray.GetLength(0))
                {
                    if (num26 > LENGTH_szEffectWarnPrefab)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szEffectWarnPrefab_ByteArray = new byte[num26];
                }
                if (1 > num26)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szEffectWarnPrefab_ByteArray, (int)num26);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szEffectWarnPrefab_ByteArray[((int)num26) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num27 = TdrTypeUtil.cstrlen(this.szEffectWarnPrefab_ByteArray) + 1;
                if (num26 != num27)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num28 = 0;
                type = srcBuf.readUInt32(ref num28);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num28 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num28 > this.szFixedPrefab_ByteArray.GetLength(0))
                {
                    if (num28 > LENGTH_szFixedPrefab)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szFixedPrefab_ByteArray = new byte[num28];
                }
                if (1 > num28)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szFixedPrefab_ByteArray, (int)num28);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szFixedPrefab_ByteArray[((int)num28) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num29 = TdrTypeUtil.cstrlen(this.szFixedPrefab_ByteArray) + 1;
                if (num28 != num29)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                uint num30 = 0;
                type = srcBuf.readUInt32(ref num30);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num30 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num30 > this.szFixedWarnPrefab_ByteArray.GetLength(0))
                {
                    if (num30 > LENGTH_szFixedWarnPrefab)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szFixedWarnPrefab_ByteArray = new byte[num30];
                }
                if (1 > num30)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szFixedWarnPrefab_ByteArray, (int)num30);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szFixedWarnPrefab_ByteArray[((int)num30) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num31 = TdrTypeUtil.cstrlen(this.szFixedWarnPrefab_ByteArray) + 1;
                if (num30 != num31)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                type           = srcBuf.readInt32(ref dest);
                this.iCoolDown = dest;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bImmediateUse);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bBIngnoreDisable);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                uint num32 = 0;
                type = srcBuf.readUInt32(ref num32);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num32 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num32 > this.szPrefab_ByteArray.GetLength(0))
                {
                    if (num32 > LENGTH_szPrefab)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szPrefab_ByteArray = new byte[num32];
                }
                if (1 > num32)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szPrefab_ByteArray, (int)num32);
                if (type == TdrError.ErrorType.TDR_NO_ERROR)
                {
                    if (this.szPrefab_ByteArray[((int)num32) - 1] != 0)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    int num33 = TdrTypeUtil.cstrlen(this.szPrefab_ByteArray) + 1;
                    if (num32 != num33)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    type = srcBuf.readInt32(ref this.iSelfSkillCombine);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iTargetSkillCombine);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwRangeAppointType);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref num2);
                    this.iRangeRadius = num2;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwTgtIncludeSelf);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwTgtIncludeEnemy);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type             = srcBuf.readInt32(ref num3);
                    this.iBaseDamage = num3;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref num4);
                    this.iFixedDistance = num4;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref num5);
                    this.iGuideDistance = num5;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref num6);
                    this.iMaxAttackDistance = num6;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iGreaterAttackDistance);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iMaxSearchDistance);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwIsBullet);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iBulletID);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwSkillUseRule);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwSkillTargetRule);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt32(ref this.dwSkillTargetFilter);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iSkillCombatType);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bIsCheckAntiCheat);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    for (int i = 0; i < 2; i++)
                    {
                        type = srcBuf.readUInt32(ref this.SkillEffectType[i]);
                        if (type != TdrError.ErrorType.TDR_NO_ERROR)
                        {
                            return(type);
                        }
                    }
                    type = srcBuf.readUInt32(ref this.dwEnergyCostType);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref this.iEnergyCostCalcType);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type             = srcBuf.readInt32(ref num7);
                    this.iEnergyCost = num7;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref num8);
                    this.iEnergyCostGrowth = num8;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readInt32(ref num9);
                    this.iCoolDownGrowth = num9;
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    type = srcBuf.readUInt8(ref this.bIsStunSkill);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    this.TransferData();
                }
            }
            return(type);
        }
Beispiel #5
0
        public TdrError.ErrorType load(ref TdrReadBuf srcBuf, uint cutVer)
        {
            uint dest = 0;
            uint num2 = 0;

            srcBuf.disableEndian();
            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            type = srcBuf.readUInt16(ref this.wID);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                int count = 0x40;
                if (this.szName_ByteArray.GetLength(0) < count)
                {
                    this.szName_ByteArray = new byte[LENGTH_szName];
                }
                type = srcBuf.readCString(ref this.szName_ByteArray, count);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bUsage);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bLevel);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt16(ref this.wGroup);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bNeedPunish);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num4 = 0x80;
                if (this.szIcon_ByteArray.GetLength(0) < num4)
                {
                    this.szIcon_ByteArray = new byte[LENGTH_szIcon];
                }
                type = srcBuf.readCString(ref this.szIcon_ByteArray, num4);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type            = srcBuf.readUInt32(ref dest);
                this.dwBuyPrice = dest;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type             = srcBuf.readUInt32(ref num2);
                this.dwSalePrice = num2;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                for (int i = 0; i < 3; i++)
                {
                    type = srcBuf.readUInt16(ref this.PreEquipID[i]);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                int num6 = 0x40;
                if (this.szRequireEquip_ByteArray.GetLength(0) < num6)
                {
                    this.szRequireEquip_ByteArray = new byte[LENGTH_szRequireEquip];
                }
                type = srcBuf.readCString(ref this.szRequireEquip_ByteArray, num6);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwPhyAttack);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwAttackSpeed);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwCriticalHit);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHealthSteal);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicAttack);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwCDReduce);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicPoint);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicRecover);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwPhyDefence);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicDefence);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHealthPoint);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHealthRecover);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMoveSpeed);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwActiveSkillID);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                int num7 = 0x80;
                if (this.szActiveSkillDes_ByteArray.GetLength(0) < num7)
                {
                    this.szActiveSkillDes_ByteArray = new byte[LENGTH_szActiveSkillDes];
                }
                type = srcBuf.readCString(ref this.szActiveSkillDes_ByteArray, num7);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                for (int j = 0; j < 2; j++)
                {
                    type = this.astPassiveSkill[j].load(ref srcBuf, cutVer);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                for (int k = 0; k < 3; k++)
                {
                    type = this.astEffectCombine[k].load(ref srcBuf, cutVer);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                int num10 = 0x80;
                if (this.szDesc_ByteArray.GetLength(0) < num10)
                {
                    this.szDesc_ByteArray = new byte[LENGTH_szDesc];
                }
                type = srcBuf.readCString(ref this.szDesc_ByteArray, num10);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bInvalid);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                this.TransferData();
            }
            return(type);
        }
Beispiel #6
0
        public TdrError.ErrorType unpack(ref TdrReadBuf srcBuf, uint cutVer)
        {
            uint dest = 0;
            uint num2 = 0;

            TdrError.ErrorType type = TdrError.ErrorType.TDR_NO_ERROR;
            if ((cutVer == 0) || (CURRVERSION < cutVer))
            {
                cutVer = CURRVERSION;
            }
            if (BASEVERSION > cutVer)
            {
                return(TdrError.ErrorType.TDR_ERR_CUTVER_TOO_SMALL);
            }
            type = srcBuf.readUInt16(ref this.wID);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                uint num3 = 0;
                type = srcBuf.readUInt32(ref num3);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num3 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num3 > this.szName_ByteArray.GetLength(0))
                {
                    if (num3 > LENGTH_szName)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szName_ByteArray = new byte[num3];
                }
                if (1 > num3)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szName_ByteArray, (int)num3);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szName_ByteArray[((int)num3) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num4 = TdrTypeUtil.cstrlen(this.szName_ByteArray) + 1;
                if (num3 != num4)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                type = srcBuf.readUInt8(ref this.bUsage);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bLevel);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bType);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt16(ref this.wGroup);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt8(ref this.bNeedPunish);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                uint num5 = 0;
                type = srcBuf.readUInt32(ref num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num5 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num5 > this.szIcon_ByteArray.GetLength(0))
                {
                    if (num5 > LENGTH_szIcon)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szIcon_ByteArray = new byte[num5];
                }
                if (1 > num5)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szIcon_ByteArray, (int)num5);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szIcon_ByteArray[((int)num5) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num6 = TdrTypeUtil.cstrlen(this.szIcon_ByteArray) + 1;
                if (num5 != num6)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                type            = srcBuf.readUInt32(ref dest);
                this.dwBuyPrice = dest;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type             = srcBuf.readUInt32(ref num2);
                this.dwSalePrice = num2;
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                for (int i = 0; i < 3; i++)
                {
                    type = srcBuf.readUInt16(ref this.PreEquipID[i]);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                uint num8 = 0;
                type = srcBuf.readUInt32(ref num8);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num8 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num8 > this.szRequireEquip_ByteArray.GetLength(0))
                {
                    if (num8 > LENGTH_szRequireEquip)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szRequireEquip_ByteArray = new byte[num8];
                }
                if (1 > num8)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szRequireEquip_ByteArray, (int)num8);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szRequireEquip_ByteArray[((int)num8) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num9 = TdrTypeUtil.cstrlen(this.szRequireEquip_ByteArray) + 1;
                if (num8 != num9)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                type = srcBuf.readUInt32(ref this.dwPhyAttack);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwAttackSpeed);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwCriticalHit);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHealthSteal);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicAttack);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwCDReduce);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicPoint);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicRecover);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwPhyDefence);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMagicDefence);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHealthPoint);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwHealthRecover);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwMoveSpeed);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                type = srcBuf.readUInt32(ref this.dwActiveSkillID);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                uint num10 = 0;
                type = srcBuf.readUInt32(ref num10);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num10 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num10 > this.szActiveSkillDes_ByteArray.GetLength(0))
                {
                    if (num10 > LENGTH_szActiveSkillDes)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szActiveSkillDes_ByteArray = new byte[num10];
                }
                if (1 > num10)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szActiveSkillDes_ByteArray, (int)num10);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (this.szActiveSkillDes_ByteArray[((int)num10) - 1] != 0)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                int num11 = TdrTypeUtil.cstrlen(this.szActiveSkillDes_ByteArray) + 1;
                if (num10 != num11)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                }
                for (int j = 0; j < 2; j++)
                {
                    type = this.astPassiveSkill[j].unpack(ref srcBuf, cutVer);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                for (int k = 0; k < 3; k++)
                {
                    type = this.astEffectCombine[k].unpack(ref srcBuf, cutVer);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                }
                uint num14 = 0;
                type = srcBuf.readUInt32(ref num14);
                if (type != TdrError.ErrorType.TDR_NO_ERROR)
                {
                    return(type);
                }
                if (num14 > srcBuf.getLeftSize())
                {
                    return(TdrError.ErrorType.TDR_ERR_SHORT_BUF_FOR_READ);
                }
                if (num14 > this.szDesc_ByteArray.GetLength(0))
                {
                    if (num14 > LENGTH_szDesc)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_BIG);
                    }
                    this.szDesc_ByteArray = new byte[num14];
                }
                if (1 > num14)
                {
                    return(TdrError.ErrorType.TDR_ERR_STR_LEN_TOO_SMALL);
                }
                type = srcBuf.readCString(ref this.szDesc_ByteArray, (int)num14);
                if (type == TdrError.ErrorType.TDR_NO_ERROR)
                {
                    if (this.szDesc_ByteArray[((int)num14) - 1] != 0)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    int num15 = TdrTypeUtil.cstrlen(this.szDesc_ByteArray) + 1;
                    if (num14 != num15)
                    {
                        return(TdrError.ErrorType.TDR_ERR_STR_LEN_CONFLICT);
                    }
                    type = srcBuf.readUInt8(ref this.bInvalid);
                    if (type != TdrError.ErrorType.TDR_NO_ERROR)
                    {
                        return(type);
                    }
                    this.TransferData();
                }
            }
            return(type);
        }