public Binding(byte[] FileData)
        {
            MemoryStream MemStream = new MemoryStream(FileData);
            BinaryReader Reader    = new BinaryReader(MemStream);

            m_Version = Endian.SwapUInt32(Reader.ReadUInt32());

            byte   StrLength  = Reader.ReadByte();
            string m_BoneName = Encoding.ASCII.GetString(Reader.ReadBytes(StrLength));

            //Should be 8.
            uint MeshAssetIDSize = Endian.SwapUInt32(Reader.ReadUInt32());

            //AssetID prefix, typical useless Maxis value...
            Reader.ReadUInt32();

            m_MeshAssetID = Endian.SwapUInt64(Reader.ReadUInt64());

            //Should be 8.
            uint TextureAssetIDSize = Endian.SwapUInt32(Reader.ReadUInt32());

            //AssetID prefix, typical useless Maxis value...
            Reader.ReadUInt32();

            m_TextureAssetID = Endian.SwapUInt64(Reader.ReadUInt64());
        }
        public Appearance(byte[] FileData)
        {
            MemoryStream MemStream = new MemoryStream(FileData);
            BinaryReader Reader    = new BinaryReader(MemStream);

            m_Version     = Endian.SwapUInt32(Reader.ReadUInt32());
            m_ThumbnailID = Endian.SwapUInt64(Reader.ReadUInt64());
            uint Count = Endian.SwapUInt32(Reader.ReadUInt32());

            for (int i = 0; i < Count; i++)
            {
                BindingIDs.Add(Endian.SwapUInt64(Reader.ReadUInt64()));
            }
        }
        public Outfit(byte[] FileData)
        {
            MemoryStream MemStream = new MemoryStream(FileData);
            BinaryReader Reader    = new BinaryReader(MemStream);

            m_Version = Endian.SwapUInt32(Reader.ReadUInt32());

            Reader.ReadUInt32(); //Unknown.

            m_LightAppearanceID  = Endian.SwapUInt64(Reader.ReadUInt64());
            m_MediumAppearanceID = Endian.SwapUInt64(Reader.ReadUInt64());
            m_DarkAppearanceID   = Endian.SwapUInt64(Reader.ReadUInt64());

            Reader.Close();
        }
Exemple #4
0
        public Hag(byte[] Filedata)
        {
            MemoryStream MemStream = new MemoryStream(Filedata);
            BinaryReader Reader    = new BinaryReader(MemStream);

            m_Appearances = new List <ulong>();

            m_Version = Reader.ReadUInt32();

            //There are always exactly 18 appearances referenced in a hand group.
            for (int i = 0; i < 17; i++)
            {
                m_Appearances.Add(Endian.SwapUInt64(Reader.ReadUInt64()));
            }
        }
        public PurchasableObject(byte[] FileData)
        {
            MemoryStream MemStream = new MemoryStream(FileData);
            BinaryReader Reader    = new BinaryReader(MemStream);

            m_Version   = Endian.SwapUInt32(Reader.ReadUInt32());
            m_Gender    = Endian.SwapUInt32(Reader.ReadUInt32());
            m_AssetType = Endian.SwapUInt32(Reader.ReadUInt32());

            Reader.ReadUInt32(); //GroupID

            m_OutfitAssetID = Convert.ToUInt64(Endian.SwapUInt64(Reader.ReadUInt64()));

            Reader.Close();
        }