public byte[] Write() { BinaryWriterEx bw = new BinaryWriterEx(false); bw.WriteASCII("DRB\0"); bw.WriteInt32(0); bw.WriteInt32(0); bw.WriteInt32(0); str.Write(bw); texi.Write(bw); shpr.Write(bw); ctpr.Write(bw); anip.Write(bw); intp.Write(bw); scdp.Write(bw); shap.Write(bw); ctrl.Write(bw); anik.Write(bw); anio.Write(bw); anim.Write(bw); scdk.Write(bw); scdo.Write(bw); scdl.Write(bw); dlg.Write(bw); bw.WriteASCII("END\0"); bw.WriteInt32(0); bw.WriteInt32(0); bw.WriteInt32(0); return(bw.FinishBytes()); }
public byte[] Write() { using (var ms = new MemoryStream()) { var bw = new BinaryWriterEx(false, ms); bw.WriteBytes(Data); bw.Position = 8; bw.WriteInt32(SteamID); bw.Position = 0x1098; bw.WriteBooleans(OccupiedSlots); for (int i = 0; i < 10; i++) { bw.Position = 0x10A2 + 0x22A * i; bw.WriteBytes(SlotData[i]); } return(bw.FinishBytes()); } }