Example #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 <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();
        }
Example #2
0
 public GameRolePlayGroupMonsterInformations(double contextualId, Types.EntityLook look, EntityDispositionInformations disposition, bool keyRingBonus, bool hasHardcoreDrop, bool hasAVARewardToken, GroupMonsterStaticInformations staticInfos, double creationTime, int ageBonusRate, sbyte lootShare, sbyte alignmentSide)
     : base(contextualId, look, disposition)
 {
     this.keyRingBonus      = keyRingBonus;
     this.hasHardcoreDrop   = hasHardcoreDrop;
     this.hasAVARewardToken = hasAVARewardToken;
     this.staticInfos       = staticInfos;
     this.creationTime      = creationTime;
     this.ageBonusRate      = ageBonusRate;
     this.lootShare         = lootShare;
     this.alignmentSide     = alignmentSide;
 }
Example #3
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            nbWaves = reader.ReadSByte();
            if (nbWaves < 0)
            {
                throw new Exception("Forbidden value on nbWaves = " + nbWaves + ", it doesn't respect the following condition : nbWaves < 0");
            }
            var limit         = reader.ReadShort();
            var alternatives_ = new GroupMonsterStaticInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                alternatives_[i] = Types.ProtocolTypeManager.GetInstance <GroupMonsterStaticInformations>(reader.ReadShort());
                alternatives_[i].Deserialize(reader);
            }
            alternatives = alternatives_;
        }
Example #4
0
 public GameRolePlayGroupMonsterWaveInformations(double contextualId, Types.EntityLook look, EntityDispositionInformations disposition, bool keyRingBonus, bool hasHardcoreDrop, bool hasAVARewardToken, GroupMonsterStaticInformations staticInfos, double creationTime, int ageBonusRate, sbyte lootShare, sbyte alignmentSide, sbyte nbWaves, IEnumerable <GroupMonsterStaticInformations> alternatives)
     : base(contextualId, look, disposition, keyRingBonus, hasHardcoreDrop, hasAVARewardToken, staticInfos, creationTime, ageBonusRate, lootShare, alignmentSide)
 {
     this.nbWaves      = nbWaves;
     this.alternatives = alternatives;
 }