Beispiel #1
0
        /// <summary>
        /// Initializes a new instance from <paramref name="reader"/>.
        /// </summary>
        /// <param name="reader">Binary file (.uop source).</param>
        /// <param name="parent">Parent package.</param>
        public MythicPackageBlock(BinaryReader reader, MythicPackage parent)
        {
            m_Parent = parent;

            m_FileCount = reader.ReadInt32();
            m_NextBlock = reader.ReadInt64();

            MythicPackageFile file;
            int index = 0;

            do
            {
                file       = new MythicPackageFile(reader, this);
                file.Index = index++;

                if (file.DataBlockAddress != 0)
                {
                    m_Files.Add(file);
                }

                //change by nolok
                //UpdateProgress( parent.Blocks.Count * parent.Header.BlockSize + index, parent.Header.FileCount );
            }while (index < m_Parent.Header.BlockSize);
        }