public void Write(BinaryFileWriter w, GameFormat format) { w.WriteASCIIString(Type, 4); if (Type == "GRUP") { w.Write(DataSize + (format == GameFormat.TES4 ? 20 : 24)); w.Write(RecordGroup.FromLabel(Group.Depth == 0, Label), 0, 4); w.Write((int)GroupType); w.Write(0U); // stamp | stamp + uknown if (format != GameFormat.TES4) { w.Write(0U); // version + uknown } return; } w.Write(DataSize); if (format == GameFormat.TES3) { w.Write(0U); // unknown } w.Write((uint)Flags); if (format == GameFormat.TES3) { return; } // tes4 w.Write(FormId); w.Write(0U); if (format == GameFormat.TES4) { return; } // tes5 w.Write(0U); }