Ejemplo n.º 1
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            keyRingBonus      = BooleanByteWrapper.GetFlag(flag1, 0);
            hasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag1, 1);
            hasAVARewardToken = BooleanByteWrapper.GetFlag(flag1, 2);
            staticInfos       = Types.ProtocolTypeManager.GetInstance <Types.GroupMonsterStaticInformations>(reader.ReadShort());
            staticInfos.Deserialize(reader);
            creationTime = reader.ReadDouble();
            if (creationTime < 0 || creationTime > 9007199254740990)
            {
                throw new Exception("Forbidden value on creationTime = " + creationTime + ", it doesn't respect the following condition : creationTime < 0 || creationTime > 9007199254740990");
            }
            ageBonusRate = reader.ReadInt();
            if (ageBonusRate < 0)
            {
                throw new Exception("Forbidden value on ageBonusRate = " + ageBonusRate + ", it doesn't respect the following condition : ageBonusRate < 0");
            }
            lootShare = reader.ReadSByte();
            if (lootShare < -1 || lootShare > 8)
            {
                throw new Exception("Forbidden value on lootShare = " + lootShare + ", it doesn't respect the following condition : lootShare < -1 || lootShare > 8");
            }
            alignmentSide = reader.ReadSByte();
        }
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            keyRingBonus      = BooleanByteWrapper.GetFlag(flag1, 0);
            hasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag1, 1);
            hasAVARewardToken = BooleanByteWrapper.GetFlag(flag1, 2);
            staticInfos       = ProtocolTypeManager.GetInstance <Types.GroupMonsterStaticInformations>(reader.ReadUShort());
            staticInfos.Deserialize(reader);
            lootShare     = reader.ReadSbyte();
            alignmentSide = reader.ReadSbyte();
        }
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     staticInfos = Types.ProtocolTypeManager.GetInstance<Types.GroupMonsterStaticInformations>(reader.ReadShort());
     staticInfos.Deserialize(reader);
     ageBonus = reader.ReadShort();
     if (ageBonus < -1 || ageBonus > 1000)
         throw new Exception("Forbidden value on ageBonus = " + ageBonus + ", it doesn't respect the following condition : ageBonus < -1 || ageBonus > 1000");
     lootShare = reader.ReadSByte();
     if (lootShare < -1 || lootShare > 8)
         throw new Exception("Forbidden value on lootShare = " + lootShare + ", it doesn't respect the following condition : lootShare < -1 || lootShare > 8");
     alignmentSide = reader.ReadSByte();
     keyRingBonus = reader.ReadBoolean();
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     byte flag1 = reader.ReadByte();
     keyRingBonus = BooleanByteWrapper.GetFlag(flag1, 0);
     hasHardcoreDrop = BooleanByteWrapper.GetFlag(flag1, 1);
     hasAVARewardToken = BooleanByteWrapper.GetFlag(flag1, 2);
     staticInfos = Types.ProtocolTypeManager.GetInstance<Types.GroupMonsterStaticInformations>(reader.ReadShort());
     staticInfos.Deserialize(reader);
     ageBonus = reader.ReadShort();
     if ((ageBonus < -1) || (ageBonus > 1000))
         throw new Exception("Forbidden value on ageBonus = " + ageBonus + ", it doesn't respect the following condition : (ageBonus < -1) || (ageBonus > 1000)");
     lootShare = reader.ReadSByte();
     if ((lootShare < -1) || (lootShare > 8))
         throw new Exception("Forbidden value on lootShare = " + lootShare + ", it doesn't respect the following condition : (lootShare < -1) || (lootShare > 8)");
     alignmentSide = reader.ReadSByte();
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     byte b = reader.ReadByte();
     this.keyRingBonus = BooleanByteWrapper.GetFlag(b, 0);
     this.hasHardcoreDrop = BooleanByteWrapper.GetFlag(b, 1);
     this.hasAVARewardToken = BooleanByteWrapper.GetFlag(b, 2);
     short s = reader.ReadShort();
     staticInfos = Types.ProtocolTypeManager.GetInstance<Types.GroupMonsterStaticInformations>(s);
     staticInfos.Deserialize(reader);
     ageBonus = reader.ReadShort();
     if (ageBonus < -1 || ageBonus > 1000)
         throw new Exception("Forbidden value on ageBonus = " + ageBonus + ", it doesn't respect the following condition : ageBonus < -1 || ageBonus > 1000");
     lootShare = reader.ReadSByte();
     if (lootShare < -1 || lootShare > 8)
         throw new Exception("Forbidden value on lootShare = " + lootShare + ", it doesn't respect the following condition : lootShare < -1 || lootShare > 8");
     alignmentSide = reader.ReadSByte();
 }
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     staticInfos = Types.ProtocolTypeManager.GetInstance <Types.GroupMonsterStaticInformations>(reader.ReadShort());
     staticInfos.Deserialize(reader);
     ageBonus = reader.ReadShort();
     if (ageBonus < -1 || ageBonus > 1000)
     {
         throw new Exception("Forbidden value on ageBonus = " + ageBonus + ", it doesn't respect the following condition : ageBonus < -1 || ageBonus > 1000");
     }
     lootShare = reader.ReadSByte();
     if (lootShare < -1 || lootShare > 8)
     {
         throw new Exception("Forbidden value on lootShare = " + lootShare + ", it doesn't respect the following condition : lootShare < -1 || lootShare > 8");
     }
     alignmentSide = reader.ReadSByte();
     keyRingBonus  = reader.ReadBoolean();
 }
Ejemplo n.º 7
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            keyRingBonus      = BooleanByteWrapper.GetFlag(flag1, 0);
            hasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag1, 1);
            hasAVARewardToken = BooleanByteWrapper.GetFlag(flag1, 2);
            staticInfos       = Types.ProtocolTypeManager.GetInstance <Types.GroupMonsterStaticInformations>(reader.ReadShort());
            staticInfos.Deserialize(reader);
            creationDate = reader.ReadDouble();
            ageBonusRate = reader.ReadUInt();
            lootShare    = reader.ReadSByte();
            if ((lootShare < -1) || (lootShare > 8))
            {
                throw new Exception("Forbidden value on lootShare = " + lootShare + ", it doesn't respect the following condition : (lootShare < -1) || (lootShare > 8)");
            }
            alignmentSide = reader.ReadSByte();
        }
Ejemplo n.º 8
0
        public override void Deserialize(BigEndianReader reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            keyRingBonus      = BooleanByteWrapper.GetFlag(flag1, 0);
            hasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag1, 1);
            hasAVARewardToken = BooleanByteWrapper.GetFlag(flag1, 2);
            staticInfos       = Types.ProtocolTypeManager.GetInstance <Types.GroupMonsterStaticInformations>(reader.ReadShort());
            staticInfos.Deserialize(reader);
            ageBonus = reader.ReadShort();
            if (ageBonus < -1 || ageBonus > 1000)
            {
                throw new Exception("Forbidden value on ageBonus = " + ageBonus + ", it doesn't respect the following condition : ageBonus < -1 || ageBonus > 1000");
            }
            lootShare = reader.ReadSByte();
            if (lootShare < -1 || lootShare > 8)
            {
                throw new Exception("Forbidden value on lootShare = " + lootShare + ", it doesn't respect the following condition : lootShare < -1 || lootShare > 8");
            }
            alignmentSide = reader.ReadSByte();
        }