Skip to content

Commit

Permalink
fix #48, #49
Browse files Browse the repository at this point in the history
  • Loading branch information
Albeoris committed May 2, 2024
1 parent cf9d0c3 commit 6c4d645
Showing 1 changed file with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@
namespace Memoria.FFPR.IL2CPP.HarmonyHooks;

// ReSharper disable InconsistentNaming
[HarmonyPatch(typeof(UserDataManager), nameof(UserDataManager.FromJsonAsync))]
public static class UserDataManager_FromJsonAsync
{
public static void Postfix(String json)
{
try
{
SaveManager.LoadData(json);
}
catch (Exception ex)
{
ModComponent.Log.LogException(ex);
}
}
}

// Handling FromJsonAsync crashes the game :/

// [HarmonyPatch(typeof(UserDataManager), nameof(UserDataManager.FromJsonAsync))]
// public static class UserDataManager_FromJsonAsync
// {
// public static void Postfix(String json)
// {
// try
// {
// SaveManager.LoadData(json);
// }
// catch (Exception ex)
// {
// ModComponent.Log.LogException(ex);
// }
// }
// }

0 comments on commit 6c4d645

Please sign in to comment.