Exemple #1
0
        public override void Deserialize(IDataReader reader)
        {
            infos = Types.ProtocolTypeManager.GetInstance <Types.GuildFactSheetInformations>(reader.ReadShort());
            infos.Deserialize(reader);
            creationDate = reader.ReadInt();
            if (creationDate < 0)
            {
                throw new Exception("Forbidden value on creationDate = " + creationDate + ", it doesn't respect the following condition : creationDate < 0");
            }
            nbTaxCollectors = reader.ReadVarShort();
            if (nbTaxCollectors < 0)
            {
                throw new Exception("Forbidden value on nbTaxCollectors = " + nbTaxCollectors + ", it doesn't respect the following condition : nbTaxCollectors < 0");
            }
            enabled = reader.ReadBoolean();
            var limit    = reader.ReadUShort();
            var members_ = new Types.CharacterMinimalInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                members_[i] = new Types.CharacterMinimalInformations();
                members_[i].Deserialize(reader);
            }
            members = members_;
        }
Exemple #2
0
        public override void Deserialize(IReader reader)
        {
            infos = ProtocolTypeManager.GetInstance <Types.GuildFactSheetInformations>(reader.ReadUShort());
            infos.Deserialize(reader);
            creationDate    = reader.ReadInt();
            nbTaxCollectors = reader.ReadVarUhShort();
            var limit = reader.ReadUShort();

            members = new Types.CharacterMinimalInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                (members as Types.CharacterMinimalInformations[])[i] = new Types.CharacterMinimalInformations();
                (members as Types.CharacterMinimalInformations[])[i].Deserialize(reader);
            }
        }
 public override void Deserialize(BigEndianReader reader)
 {
     infos = Types.ProtocolTypeManager.GetInstance<Types.GuildFactSheetInformations>(reader.ReadShort());
     infos.Deserialize(reader);
     creationDate = reader.ReadInt();
     if (creationDate < 0)
         throw new Exception("Forbidden value on creationDate = " + creationDate + ", it doesn't respect the following condition : creationDate < 0");
     nbTaxCollectors = reader.ReadVarShort();
     if (nbTaxCollectors < 0)
         throw new Exception("Forbidden value on nbTaxCollectors = " + nbTaxCollectors + ", it doesn't respect the following condition : nbTaxCollectors < 0");
     enabled = reader.ReadBoolean();
     var limit = reader.ReadUShort();
     members = new Types.CharacterMinimalInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          members[i] = new Types.CharacterMinimalInformations();
          members[i].Deserialize(reader);
     }
 }