Пример #1
0
 protected override Stream UnParse()
 {
     var s = new MemoryStream();
     var bw = new BinaryWriter(s);
     bw.Write(this.version);
     if (this.commonA == null) { this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged); }
     this.commonA.UnParse(s);
     if (modlEntryList01 == null) { modlEntryList01 = new SpnFenMODLEntryList(this.OnResourceChanged); }
     this.modlEntryList01.UnParse(s);
     if (modlEntryList02 == null) { modlEntryList02 = new SpnFenMODLEntryList(this.OnResourceChanged); }
     this.modlEntryList02.UnParse(s);
     if (modlEntryList03 == null) { modlEntryList03 = new SpnFenMODLEntryList(this.OnResourceChanged); }
     this.modlEntryList03.UnParse(s);
     if (modlEntryList04 == null) { modlEntryList04 = new SpnFenMODLEntryList(this.OnResourceChanged); }
     this.modlEntryList04.UnParse(s);
     if (this.refList == null) { this.refList = new Gp7references(kRecommendedApiVersion, this.OnResourceChanged); }
     this.refList.UnParse(s);
     bw.Write(this.materialVariant);
     bw.Write(this.unkIID01);
     if (this.colors == null) { this.colors = new ColorList(this.OnResourceChanged); }
     this.colors.UnParse(s);
     return s;
 }
Пример #2
0
 void Parse(Stream s)
 {
     var br = new BinaryReader(s);
     this.version = br.ReadUInt32();
     this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.modlEntryList01 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
     this.modlEntryList02 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
     this.modlEntryList03 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
     this.modlEntryList04 = new SpnFenMODLEntryList(this.OnResourceChanged, s);
     this.refList = new Gp7references(kRecommendedApiVersion, this.OnResourceChanged, s);
     this.materialVariant = br.ReadUInt32();
     this.unkIID01 = br.ReadUInt64();
     this.colors = new ColorList(this.OnResourceChanged, s);
 }