示例#1
0
        /// <summary>
        /// Unserializes a BinaryStream into the Attributes of this Instance
        /// </summary>
        /// <param name="reader">The Stream that contains the FileData</param>
        public override void Unserialize(System.IO.BinaryReader reader)
        {
            version = reader.ReadUInt32();

            string name = reader.ReadString();
            uint   myid = reader.ReadUInt32();

            rn.Unserialize(reader);
            rn.BlockID = myid;

            name = reader.ReadString();
            myid = reader.ReadUInt32();
            bn.Unserialize(reader);
            bn.BlockID = myid;

            name = reader.ReadString();
            myid = reader.ReadUInt32();
            tn.Unserialize(reader);
            tn.BlockID = myid;

            unknown1 = reader.ReadInt16();
            items    = new string[reader.ReadUInt32()];
            for (int i = 0; i < items.Length; i++)
            {
                items[i] = reader.ReadString();
            }

            unknown2 = reader.ReadBytes(13);
        }
示例#2
0
        /// <summary>
        /// Unserializes a BinaryStream into the Attributes of this Instance
        /// </summary>
        /// <param name="reader">The Stream that contains the FileData</param>
        public override void Unserialize(System.IO.BinaryReader reader)
        {
            version = reader.ReadUInt32();

            string name = reader.ReadString();
            uint   myid = reader.ReadUInt32();

            rn.Unserialize(reader);
            rn.BlockID = myid;

            name = reader.ReadString();
            myid = reader.ReadUInt32();
            bn.Unserialize(reader);
            bn.BlockID = myid;

            name = reader.ReadString();
            myid = reader.ReadUInt32();
            tn.Unserialize(reader);
            tn.BlockID = myid;

            unknown1  = reader.ReadInt16();
            unknown2  = reader.ReadInt32();
            this.name = reader.ReadString();
            unknown3  = reader.ReadInt32();
            unknown4  = reader.ReadByte();

            itemsa = new ShapeRefNodeItem_A[reader.ReadUInt32()];
            for (int i = 0; i < itemsa.Length; i++)
            {
                itemsa[i] = new ShapeRefNodeItem_A();
                itemsa[i].Unserialize(reader);
            }
            unknown5 = reader.ReadInt32();

            itemsb = new ShapeRefNodeItem_B[reader.ReadUInt32()];
            for (int i = 0; i < itemsb.Length; i++)
            {
                itemsb[i]          = new ShapeRefNodeItem_B();
                itemsb[i].Unknown1 = reader.ReadInt32();
            }

            int len = 0;

            if (version == 0x15)
            {
                for (int i = 0; i < itemsb.Length; i++)
                {
                    itemsb[i].Name = reader.ReadString();
                }
            }

            len      = reader.ReadInt32();
            data     = reader.ReadBytes(len);
            unknown6 = reader.ReadInt32();
        }