Exemplo n.º 1
0
        public void Write(ResourcePackInfos packInfos)
        {
            if (packInfos == null)
            {
                _writer.Write((short)0);                 // LE
                return;
            }

            _writer.Write((short)packInfos.Count);              // LE
            foreach (var info in packInfos)
            {
                Write(info.PackIdVersion.Id);
                Write(info.PackIdVersion.Version);
                Write(info.Unknown);
            }
        }
Exemplo n.º 2
0
        public ResourcePackInfos ReadResourcePackInfos()
        {
            int count = _reader.ReadInt16();             // LE

            var packInfos = new ResourcePackInfos();

            for (int i = 0; i < count; i++)
            {
                var info = new ResourcePackInfo();
                info.PackIdVersion = new PackIdVersion()
                {
                    Id = ReadString(), Version = ReadString()
                };
                info.Unknown = ReadUlong();
                packInfos.Add(info);
            }

            return(packInfos);
        }