public static void CreateUOP(string path, Patch[] patches, ProgressChangeHandler progressDelegate) { PatchWriter writer = new PatchWriter(File.Create(path), PatchFileType.UOP); writer.WriteUOPHeader(); writer.Write(patches.Length); writer.Write((int)0);//Unknown for( int i = 0; i < patches.Length; i++ ) { writer.WriteUOPPatch(patches[i]); if( i != 0 && progressDelegate != null ) progressDelegate(writer, new ProgressChangeEventArgs(((100 * i) / patches.Length), i, patches.Length)); } writer.Close(); }
public static void CreateMUO(string path, Patch[] patches, ProgressChangeHandler progressDelegate) { PatchWriter writer = new PatchWriter(File.Create(path), PatchFileType.MUO); writer.WriteMUOHeader(); writer.WriteMUOMetaData(new string[] { "MUO", "Created with PatchLib", "Jeff Boulanger" }); writer.Write((int)patches.Length); for( int i = 0; i < patches.Length; i++ ) { writer.WriteMUOPatch(patches[i]); if( i != 0 && progressDelegate != null ) progressDelegate(writer, new ProgressChangeEventArgs(((100 * i) / patches.Length), i, patches.Length)); } writer.Close(); }
public static void CreateMUO(string path, Patch[] patches, ProgressChangeHandler progressDelegate) { PatchWriter writer = new PatchWriter(File.Create(path), PatchFileType.MUO); writer.WriteMUOHeader(); writer.WriteMUOMetaData(new string[] { "MUO", "Created with PatchLib", "Jeff Boulanger" }); writer.Write((int)patches.Length); for (int i = 0; i < patches.Length; i++) { writer.WriteMUOPatch(patches[i]); if (i != 0 && progressDelegate != null) { progressDelegate(writer, new ProgressChangeEventArgs(((100 * i) / patches.Length), i, patches.Length)); } } writer.Close(); }
public static void CreateUOP(string path, Patch[] patches, ProgressChangeHandler progressDelegate) { PatchWriter writer = new PatchWriter(File.Create(path), PatchFileType.UOP); writer.WriteUOPHeader(); writer.Write(patches.Length); writer.Write((int)0); //Unknown for (int i = 0; i < patches.Length; i++) { writer.WriteUOPPatch(patches[i]); if (i != 0 && progressDelegate != null) { progressDelegate(writer, new ProgressChangeEventArgs(((100 * i) / patches.Length), i, patches.Length)); } } writer.Close(); }