|
|
@@ -10,22 +10,22 @@ namespace IronmanChest.Patches
|
|
|
public static class Patch_GameScript_UpgradeStorage
|
|
|
{
|
|
|
[HarmonyPrefix]
|
|
|
- public static void Prefix(GameScript __instance, Item[] ___storage, ref int ___storageLevel, out int __originalStorageLevel)
|
|
|
+ public static void Prefix(GameScript __instance, Item[] ___storage, ref int ___storageLevel, out int __state)
|
|
|
{
|
|
|
- __originalStorageLevel = -1;
|
|
|
+ __state = -1;
|
|
|
if (Menuu.curProfession == 1)
|
|
|
{
|
|
|
- __originalStorageLevel = PreviewLabs.PlayerPrefs.GetInt("storageLevel");
|
|
|
+ __state = PreviewLabs.PlayerPrefs.GetInt("storageLevel");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
[HarmonyPostfix]
|
|
|
[HarmonyPriority(Priority.Low)]
|
|
|
- public static void Postfix(GameScript __instance, Item[] ___storage, ref int ___storageLevel, int __originalStorageLevel)
|
|
|
+ public static void Postfix(GameScript __instance, Item[] ___storage, ref int ___storageLevel, int __state)
|
|
|
{
|
|
|
if (Menuu.curProfession == 1)
|
|
|
{
|
|
|
- PreviewLabs.PlayerPrefs.SetInt("storageLevel", __originalStorageLevel);
|
|
|
+ PreviewLabs.PlayerPrefs.SetInt("storageLevel", __state);
|
|
|
PreviewLabs.PlayerPrefs.SetInt(Menuu.curChar + "ironmanstorageLevel", ___storageLevel);
|
|
|
}
|
|
|
}
|