Example #1
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            uint num1 = (uint)reader.ReadByte();

            this.sex                = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)0);
            this.isRideable         = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)1);
            this.isFeconded         = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)2);
            this.isFecondationReady = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)3);
            this.id = (double)reader.ReadVarUhLong();
            if (this.id < 0.0 || this.id > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.id + ") on element of ObjectEffectMount.id.");
            }
            this.expirationDate = (double)reader.ReadVarUhLong();
            if (this.expirationDate < 0.0 || this.expirationDate > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.expirationDate + ") on element of ObjectEffectMount.expirationDate.");
            }
            this.model = reader.ReadVarUhInt();
            if (this.model < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.model + ") on element of ObjectEffectMount.model.");
            }
            this.name  = reader.ReadUTF();
            this.owner = reader.ReadUTF();
            this.level = (uint)reader.ReadByte();
            if (this.level < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.level + ") on element of ObjectEffectMount.level.");
            }
            this.reproductionCount    = reader.ReadVarInt();
            this.reproductionCountMax = reader.ReadVarUhInt();
            if (this.reproductionCountMax < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.reproductionCountMax + ") on element of ObjectEffectMount.reproductionCountMax.");
            }
            uint num2 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num2; ++index)
            {
                ObjectEffectInteger objectEffectInteger = new ObjectEffectInteger();
                objectEffectInteger.Deserialize(reader);
                this.effects.Add(objectEffectInteger);
            }
            uint num3 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num3; ++index)
            {
                uint num4 = reader.ReadVarUhInt();
                if (num4 < 0U)
                {
                    throw new Exception("Forbidden value (" + (object)num4 + ") on elements of capacities.");
                }
                this.capacities.Add(num4);
            }
        }
Example #2
0
        public virtual void Deserialize(IDataReader reader)
        {
            uint num1 = (uint)reader.ReadByte();

            this.sex                = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)0);
            this.isRideable         = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)1);
            this.isWild             = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)2);
            this.isFecondationReady = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)3);
            this.useHarnessColors   = Burning.DofusProtocol.Network.BooleanByteWrapper.GetFlag((byte)num1, (byte)4);
            this.id = reader.ReadDouble();
            if (this.id < -9.00719925474099E+15 || this.id > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.id + ") on element of MountClientData.id.");
            }
            this.model = reader.ReadVarUhInt();
            if (this.model < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.model + ") on element of MountClientData.model.");
            }
            uint num2 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num2; ++index)
            {
                uint num3 = (uint)reader.ReadInt();
                if (num3 < 0U)
                {
                    throw new Exception("Forbidden value (" + (object)num3 + ") on elements of ancestor.");
                }
                this.ancestor.Add(num3);
            }
            uint num4 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num4; ++index)
            {
                uint num3 = (uint)reader.ReadInt();
                if (num3 < 0U)
                {
                    throw new Exception("Forbidden value (" + (object)num3 + ") on elements of behaviors.");
                }
                this.behaviors.Add(num3);
            }
            this.name    = reader.ReadUTF();
            this.ownerId = (uint)reader.ReadInt();
            if (this.ownerId < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.ownerId + ") on element of MountClientData.ownerId.");
            }
            this.experience = (double)reader.ReadVarUhLong();
            if (this.experience < 0.0 || this.experience > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.experience + ") on element of MountClientData.experience.");
            }
            this.experienceForLevel = (double)reader.ReadVarUhLong();
            if (this.experienceForLevel < 0.0 || this.experienceForLevel > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.experienceForLevel + ") on element of MountClientData.experienceForLevel.");
            }
            this.experienceForNextLevel = reader.ReadDouble();
            if (this.experienceForNextLevel < -9.00719925474099E+15 || this.experienceForNextLevel > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.experienceForNextLevel + ") on element of MountClientData.experienceForNextLevel.");
            }
            this.level = (uint)reader.ReadByte();
            if (this.level < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.level + ") on element of MountClientData.level.");
            }
            this.maxPods = reader.ReadVarUhInt();
            if (this.maxPods < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.maxPods + ") on element of MountClientData.maxPods.");
            }
            this.stamina = reader.ReadVarUhInt();
            if (this.stamina < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.stamina + ") on element of MountClientData.stamina.");
            }
            this.staminaMax = reader.ReadVarUhInt();
            if (this.staminaMax < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.staminaMax + ") on element of MountClientData.staminaMax.");
            }
            this.maturity = reader.ReadVarUhInt();
            if (this.maturity < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.maturity + ") on element of MountClientData.maturity.");
            }
            this.maturityForAdult = reader.ReadVarUhInt();
            if (this.maturityForAdult < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.maturityForAdult + ") on element of MountClientData.maturityForAdult.");
            }
            this.energy = reader.ReadVarUhInt();
            if (this.energy < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.energy + ") on element of MountClientData.energy.");
            }
            this.energyMax = reader.ReadVarUhInt();
            if (this.energyMax < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.energyMax + ") on element of MountClientData.energyMax.");
            }
            this.serenity        = reader.ReadInt();
            this.aggressivityMax = reader.ReadInt();
            this.serenityMax     = reader.ReadVarUhInt();
            if (this.serenityMax < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.serenityMax + ") on element of MountClientData.serenityMax.");
            }
            this.love = reader.ReadVarUhInt();
            if (this.love < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.love + ") on element of MountClientData.love.");
            }
            this.loveMax = reader.ReadVarUhInt();
            if (this.loveMax < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.loveMax + ") on element of MountClientData.loveMax.");
            }
            this.fecondationTime = reader.ReadInt();
            this.boostLimiter    = (uint)reader.ReadInt();
            if (this.boostLimiter < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.boostLimiter + ") on element of MountClientData.boostLimiter.");
            }
            this.boostMax = reader.ReadDouble();
            if (this.boostMax < -9.00719925474099E+15 || this.boostMax > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.boostMax + ") on element of MountClientData.boostMax.");
            }
            this.reproductionCount    = reader.ReadInt();
            this.reproductionCountMax = reader.ReadVarUhInt();
            if (this.reproductionCountMax < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.reproductionCountMax + ") on element of MountClientData.reproductionCountMax.");
            }
            this.harnessGID = (uint)reader.ReadVarUhShort();
            if (this.harnessGID < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.harnessGID + ") on element of MountClientData.harnessGID.");
            }
            uint num5 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num5; ++index)
            {
                ObjectEffectInteger objectEffectInteger = new ObjectEffectInteger();
                objectEffectInteger.Deserialize(reader);
                this.effectList.Add(objectEffectInteger);
            }
        }