Skip to content

Commit

Permalink
Updated Prefab Fixer for TU3
Browse files Browse the repository at this point in the history
  • Loading branch information
keegars committed Nov 24, 2022
1 parent 39b8b21 commit 827dd85
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
26 changes: 12 additions & 14 deletions MHR - Prefab Fixer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,26 @@ private static void Main(string[] args)
var prefabs = Directory.GetFiles(conversionFolder.FullName, "*.pfb.17", SearchOption.AllDirectories);

//TU1 Conversion
var oldPrefabHex = "66 e1 a6 8f 06 6d d5 ed d1 07 28 e8 bb dd 1d 11";
var oldPrefabBytes = HexStringToByte(oldPrefabHex);

var newPrefabHex = "66 e1 a6 8f 46 5f 73 52 d1 07 28 e8 bb dd 1d 11";
var newPrefabBytes = HexStringToByte(newPrefabHex);

ConvertPrefabs(prefabs, oldPrefabBytes, newPrefabBytes);
TUConversion(prefabs, "66 e1 a6 8f 06 6d d5 ed d1 07 28 e8 bb dd 1d 11", "66 e1 a6 8f 46 5f 73 52 d1 07 28 e8 bb dd 1d 11");

//TU2 Conversion
oldPrefabHex = "46 5F 73 52 D1 07 28 E8 BB DD 1D 11";
oldPrefabBytes = HexStringToByte(oldPrefabHex);
TUConversion(prefabs, "46 5F 73 52 D1 07 28 E8 BB DD 1D 11", "7F D7 47 7F D1 07 28 E8 68 20 A6 CB");

newPrefabHex = "7F D7 47 7F D1 07 28 E8 68 20 A6 CB";
newPrefabBytes = HexStringToByte(newPrefabHex);

ConvertPrefabs(prefabs, oldPrefabBytes, newPrefabBytes);
//TU3 Conversion
TUConversion(prefabs, "7F D7 47 7F D1 07", "71 7F C2 1A D1 07");


//Open Folder Location with file explorer
OpenExplorerLocation(conversionFolder.FullName);
}

public static void TUConversion(string[] prefabs, string oldPrefabHex, string newPrefabHex)
{
var oldPrefabBytes = HexStringToByte(oldPrefabHex);
var newPrefabBytes = HexStringToByte(newPrefabHex);

ConvertPrefabs(prefabs, oldPrefabBytes, newPrefabBytes);
}

private static void ConvertPrefabs(string[] prefabs, byte[] oldPrefabBytes, byte[] newPrefabBytes)
{
foreach (var prefab in prefabs)
Expand Down
4 changes: 2 additions & 2 deletions MHR - Prefab Fixer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

0 comments on commit 827dd85

Please sign in to comment.