Exemplo n.º 1
0
        public virtual void Deserialize(IDataReader reader)
        {
            slaveId = reader.ReadDouble();
            if (slaveId < -9007199254740990 || slaveId > 9007199254740990)
            {
                throw new Exception("Forbidden value on slaveId = " + slaveId + ", it doesn't respect the following condition : slaveId < -9007199254740990 || slaveId > 9007199254740990");
            }
            var limit           = reader.ReadUShort();
            var spellCooldowns_ = new Types.GameFightSpellCooldown[limit];

            for (int i = 0; i < limit; i++)
            {
                spellCooldowns_[i] = new Types.GameFightSpellCooldown();
                spellCooldowns_[i].Deserialize(reader);
            }
            spellCooldowns = spellCooldowns_;
            summonCount    = reader.ReadSByte();
            if (summonCount < 0)
            {
                throw new Exception("Forbidden value on summonCount = " + summonCount + ", it doesn't respect the following condition : summonCount < 0");
            }
            bombCount = reader.ReadSByte();
            if (bombCount < 0)
            {
                throw new Exception("Forbidden value on bombCount = " + bombCount + ", it doesn't respect the following condition : bombCount < 0");
            }
        }
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            var limit = (ushort)reader.ReadUShort();

            spellCooldowns = new Types.GameFightSpellCooldown[limit];
            for (int i = 0; i < limit; i++)
            {
                spellCooldowns[i] = new Types.GameFightSpellCooldown();
                spellCooldowns[i].Deserialize(reader);
            }
            summonCount = reader.ReadSbyte();
            bombCount   = reader.ReadSbyte();
        }
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     var limit = reader.ReadUShort();
     spellCooldowns = new Types.GameFightSpellCooldown[limit];
     for (int i = 0; i < limit; i++)
     {
          spellCooldowns[i] = new Types.GameFightSpellCooldown();
          spellCooldowns[i].Deserialize(reader);
     }
     summonCount = reader.ReadSByte();
     if (summonCount < 0)
         throw new Exception("Forbidden value on summonCount = " + summonCount + ", it doesn't respect the following condition : summonCount < 0");
     bombCount = reader.ReadSByte();
     if (bombCount < 0)
         throw new Exception("Forbidden value on bombCount = " + bombCount + ", it doesn't respect the following condition : bombCount < 0");
 }
        public void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            var limit = reader.ReadUShort();

            spellCooldowns = new Types.GameFightSpellCooldown[limit];
            for (int i = 0; i < limit; i++)
            {
                spellCooldowns[i] = new Types.GameFightSpellCooldown();
                spellCooldowns[i].Deserialize(reader);
            }
            summonCount = reader.ReadSByte();
            if (summonCount < 0)
            {
                throw new System.Exception("Forbidden value on summonCount = " + summonCount + ", it doesn't respect the following condition : summonCount < 0");
            }
            bombCount = reader.ReadSByte();
            if (bombCount < 0)
            {
                throw new System.Exception("Forbidden value on bombCount = " + bombCount + ", it doesn't respect the following condition : bombCount < 0");
            }
        }