Example #1
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            this.stepId = reader.ReadVarUhShort();

            if (this.stepId < 0)
            {
                throw new Exception("Forbidden value on stepId = " + this.stepId + ", it doesn't respect the following condition : stepId < 0");
            }
            var limit = reader.ReadUShort();

            this.objectives = new QuestObjectiveInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                this.objectives[i] = ProtocolTypeManager.GetInstance <QuestObjectiveInformations>(reader.ReadShort());
                this.objectives[i].Deserialize(reader);
            }
        }
Example #2
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            this.sellType = reader.ReadSByte();

            if (this.sellType < 0)
            {
                throw new Exception("Forbidden value on sellType = " + this.sellType + ", it doesn't respect the following condition : sellType < 0");
            }
            var limit = reader.ReadUShort();

            this.options = new HumanOption[limit];
            for (int i = 0; i < limit; i++)
            {
                this.options[i] = ProtocolTypeManager.GetInstance <HumanOption>(reader.ReadShort());
                this.options[i].Deserialize(reader);
            }
        }
Example #3
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            this.nbWaves = reader.ReadSByte();

            if (this.nbWaves < 0)
            {
                throw new Exception("Forbidden value on nbWaves = " + this.nbWaves + ", it doesn't respect the following condition : nbWaves < 0");
            }
            var limit = reader.ReadUShort();

            this.alternatives = new GroupMonsterStaticInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                (this.alternatives as GroupMonsterStaticInformations[])[i] = ProtocolTypeManager.GetInstance <GroupMonsterStaticInformations>(reader.ReadShort());
                (this.alternatives as GroupMonsterStaticInformations[])[i].Deserialize(reader);
            }
        }
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            this.level = reader.ReadByte();

            if (this.level < 1 || this.level > 200)
            {
                throw new Exception("Forbidden value on level = " + this.level + ", it doesn't respect the following condition : level < 1 || level > 200");
            }
            var limit = reader.ReadUShort();

            this.additional = new FightResultAdditionalData[limit];
            for (int i = 0; i < limit; i++)
            {
                this.additional[i] = ProtocolTypeManager.GetInstance <FightResultAdditionalData>(reader.ReadShort());
                this.additional[i].Deserialize(reader);
            }
        }
Example #5
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            this.worldX = reader.ReadShort();

            if (this.worldX < -255 || this.worldX > 255)
            {
                throw new Exception("Forbidden value on worldX = " + this.worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
            }
            this.worldY = reader.ReadShort();

            if (this.worldY < -255 || this.worldY > 255)
            {
                throw new Exception("Forbidden value on worldY = " + this.worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
            }
            this.mapId = reader.ReadInt();
            this.prism = ProtocolTypeManager.GetInstance <PrismInformation>(reader.ReadShort());
            this.prism.Deserialize(reader);
        }
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            this.keyRingBonus      = BooleanByteWrapper.GetFlag(flag1, 0);
            this.hasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag1, 1);
            this.hasAVARewardToken = BooleanByteWrapper.GetFlag(flag1, 2);
            this.staticInfos       = ProtocolTypeManager.GetInstance <GroupMonsterStaticInformations>(reader.ReadShort());
            this.staticInfos.Deserialize(reader);
            this.creationDate = reader.ReadDouble();
            this.ageBonusRate = reader.ReadUInt();
            this.lootShare    = reader.ReadSByte();

            if ((this.lootShare < -1) || (this.lootShare > 8))
            {
                throw new Exception("Forbidden value on lootShare = " + this.lootShare + ", it doesn't respect the following condition : (lootShare < -1) || (lootShare > 8)");
            }
            this.alignmentSide = reader.ReadSByte();
        }
Example #7
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            this.playerId = reader.ReadVarUhLong();

            if (this.playerId < 0 || this.playerId > 9007199254740990)
            {
                throw new Exception("Forbidden value on playerId = " + this.playerId + ", it doesn't respect the following condition : playerId < 0 || playerId > 9007199254740990");
            }
            this.playerName = reader.ReadUTF();
            this.level      = reader.ReadByte();

            if (this.level < 0 || this.level > 200)
            {
                throw new Exception("Forbidden value on level = " + this.level + ", it doesn't respect the following condition : level < 0 || level > 200");
            }
            this.alignmentSide = reader.ReadSByte();
            this.breed         = reader.ReadSByte();

            if (this.breed < (byte)Enums.PlayableBreedEnum.Feca || this.breed > (byte)Enums.PlayableBreedEnum.Huppermage)
            {
                throw new Exception("Forbidden value on breed = "
                                    + this.breed
                                    + ", it doesn't respect the following condition : breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Huppermage");
            }
            this.sex       = reader.ReadBoolean();
            this.guildInfo = new BasicGuildInformations();
            this.guildInfo.Deserialize(reader);
            this.moodSmileyId = reader.ReadVarUhShort();

            if (this.moodSmileyId < 0)
            {
                throw new Exception("Forbidden value on moodSmileyId = " + this.moodSmileyId + ", it doesn't respect the following condition : moodSmileyId < 0");
            }
            this.status = ProtocolTypeManager.GetInstance <PlayerStatus>(reader.ReadShort());
            this.status.Deserialize(reader);
        }
Example #8
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     this.portal = ProtocolTypeManager.GetInstance <PortalInformation>(reader.ReadShort());
     this.portal.Deserialize(reader);
 }