protected override Stream UnParse() { MemoryStream ms = new MemoryStream(); BinaryWriter w = new BinaryWriter(ms); w.Write(this.version); w.Write(this.rleInstance); if (this.overlayList == null) { this.overlayList = new OverlayReferenceList(OnResourceChanged); } this.overlayList.UnParse(ms); w.Write(this.unknown1); w.Write(this.unknown2); if (this.unknownList == null) { this.unknownList = new SimpleList <uint>(OnResourceChanged); } w.Write(this.unknownList.Count); foreach (var i in this.unknownList) { w.Write(i); } w.Write(this.unknown3); if (this.swatchList == null) { this.swatchList = new SwatchColorList(OnResourceChanged); } this.swatchList.UnParse(ms); w.Write(this.unknown4); w.Write(this.unknown5); return(ms); }
void Parse(Stream s) { BinaryReader r = new BinaryReader(s); s.Position = 0; this.version = r.ReadUInt32(); this.ageGender = (AgeGenderFlags)r.ReadUInt32(); this.groupingID = r.ReadUInt64(); this.unknown1 = r.ReadByte(); this.simOutfitReference = r.ReadUInt64(); this.textureReference = r.ReadUInt64(); this.simDataReference = r.ReadUInt64(); this.nameHash = r.ReadUInt32(); this.descHash = r.ReadUInt32(); this.unknown2 = new DataBlobHandler(recommendedApiVersion, OnResourceChanged, r.ReadBytes(14)); this.unknown3 = r.ReadUInt32(); this.animationReference1 = r.ReadUInt64(); this.animationStateName1 = System.Text.Encoding.ASCII.GetString(r.ReadBytes(r.ReadInt32())); this.animationReference2 = r.ReadUInt64(); this.animationStateName2 = System.Text.Encoding.ASCII.GetString(r.ReadBytes(r.ReadInt32())); this.colorList = new SwatchColorList(OnResourceChanged, s); this.unknown6 = r.ReadUInt32(); this.unknown7 = r.ReadUInt32(); this.unknown8 = r.ReadByte(); }
void Parse(Stream s) { BinaryReader r = new BinaryReader(s); s.Position = 0; this.version = r.ReadUInt32(); this.rleInstance = r.ReadUInt64(); this.overlayList = new OverlayReferenceList(OnResourceChanged, s); this.unknown1 = r.ReadUInt32(); this.unknown2 = r.ReadUInt32(); int count = r.ReadInt32(); this.unknownList = new SimpleList <uint>(OnResourceChanged); for (int i = 0; i < count; i++) { this.unknownList.Add(r.ReadUInt32()); } this.unknown3 = r.ReadUInt32(); this.swatchList = new SwatchColorList(OnResourceChanged, s); this.unknown4 = r.ReadUInt32(); this.unknown5 = r.ReadUInt32(); }