public virtual void Deserialize(IDataReader reader)
        {
            this.uniqueId = reader.ReadDouble();
            if (this.uniqueId < 0.0 || this.uniqueId > 9.00719925474099E+15)
            {
                throw new Exception("Forbidden value (" + (object)this.uniqueId + ") on element of TaxCollectorInformations.uniqueId.");
            }
            this.firtNameId = (uint)reader.ReadVarUhShort();
            if (this.firtNameId < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.firtNameId + ") on element of TaxCollectorInformations.firtNameId.");
            }
            this.lastNameId = (uint)reader.ReadVarUhShort();
            if (this.lastNameId < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.lastNameId + ") on element of TaxCollectorInformations.lastNameId.");
            }
            this.additionalInfos = new AdditionalTaxCollectorInformations();
            this.additionalInfos.Deserialize(reader);
            this.worldX = (int)reader.ReadShort();
            if (this.worldX < -255 || this.worldX > (int)byte.MaxValue)
            {
                throw new Exception("Forbidden value (" + (object)this.worldX + ") on element of TaxCollectorInformations.worldX.");
            }
            this.worldY = (int)reader.ReadShort();
            if (this.worldY < -255 || this.worldY > (int)byte.MaxValue)
            {
                throw new Exception("Forbidden value (" + (object)this.worldY + ") on element of TaxCollectorInformations.worldY.");
            }
            this.subAreaId = (uint)reader.ReadVarUhShort();
            if (this.subAreaId < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.subAreaId + ") on element of TaxCollectorInformations.subAreaId.");
            }
            this.state = (uint)reader.ReadByte();
            if (this.state < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.state + ") on element of TaxCollectorInformations.state.");
            }
            this.look = new EntityLook();
            this.look.Deserialize(reader);
            uint num = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num; ++index)
            {
                TaxCollectorComplementaryInformations instance = ProtocolTypeManager.GetInstance <TaxCollectorComplementaryInformations>((uint)reader.ReadUShort());
                instance.Deserialize(reader);
                this.complements.Add(instance);
            }
        }
 public TaxCollectorInformations(
     double uniqueId,
     uint firtNameId,
     uint lastNameId,
     AdditionalTaxCollectorInformations additionalInfos,
     int worldX,
     int worldY,
     uint subAreaId,
     uint state,
     EntityLook look,
     List <TaxCollectorComplementaryInformations> complements)
 {
     this.uniqueId        = uniqueId;
     this.firtNameId      = firtNameId;
     this.lastNameId      = lastNameId;
     this.additionalInfos = additionalInfos;
     this.worldX          = worldX;
     this.worldY          = worldY;
     this.subAreaId       = subAreaId;
     this.state           = state;
     this.look            = look;
     this.complements     = complements;
 }