diff --git a/Patches/FixTraderControllerSimulateFalsePatch.cs b/Patches/FixTraderControllerSimulateFalsePatch.cs index c4222be..ec3dbca 100644 --- a/Patches/FixTraderControllerSimulateFalsePatch.cs +++ b/Patches/FixTraderControllerSimulateFalsePatch.cs @@ -16,7 +16,7 @@ namespace UIFixes // Recreatign this function to add the comment section, so calling this with simulate = false doesn't break everything [PatchPrefix] [HarmonyPriority(Priority.Last)] - public static bool Prefix(TraderControllerClass __instance, ItemContextAbstractClass itemContext, Item targetItem, bool partialTransferOnly, bool simulate, ref GStruct413 __result) + public static bool Prefix(TraderControllerClass __instance, ItemContextAbstractClass itemContext, Item targetItem, bool partialTransferOnly, bool simulate, ref object __result) { TraderControllerClass.Struct754 opStruct; opStruct.targetItem = targetItem; @@ -37,7 +37,7 @@ namespace UIFixes return false; } - GStruct413 operation = __instance.method_22(ref error, ref opStruct); + var operation = __instance.method_22(ref error, ref opStruct); if (operation.Succeeded) { __result = operation; @@ -47,7 +47,7 @@ namespace UIFixes if (opStruct.targetItem is GInterface306 applicable) { - GStruct413 operation = __instance.method_23(applicable, ref error, ref opStruct); + var operation = __instance.method_23(applicable, ref error, ref opStruct); if (operation.Succeeded) { if (itemContext.IsOperationAllowed(operation.Value)) @@ -67,7 +67,7 @@ namespace UIFixes if (mergeAvailable && splitAvailable) { - GStruct413 operation = __instance.method_24(ref error, ref opStruct); + var operation = __instance.method_24(ref error, ref opStruct); if (operation.Succeeded) { __result = operation; diff --git a/Patches/FixUnloadLastBulletPatch.cs b/Patches/FixUnloadLastBulletPatch.cs index 2f4ebbd..1581c0e 100644 --- a/Patches/FixUnloadLastBulletPatch.cs +++ b/Patches/FixUnloadLastBulletPatch.cs @@ -27,12 +27,12 @@ namespace UIFixes item.GetAllItemsNonAlloc(___list_2, false, true); foreach (Item item2 in ___list_2) { - foreach (GEventArgs1 geventArgs in __instance.List_0) + foreach (var eventArgs in __instance.List_0) { - ItemAddress location = geventArgs.GetLocation(); - if (!geventArgs.OwnerId.Equals(anotherOwner.ID) && !geventArgs.OwnerId.Equals(__instance.ID)) // checking against this is what I changed + ItemAddress location = eventArgs.GetLocation(); + if (!eventArgs.OwnerId.Equals(anotherOwner.ID) && !eventArgs.OwnerId.Equals(__instance.ID)) // checking against this is what I changed { - if (item2 == geventArgs.Item) + if (item2 == eventArgs.Item) { __result = true; return false;