From eaf0c40d46151f6389d6d2b3a81ff45685650363 Mon Sep 17 00:00:00 2001 From: Terkoiz Date: Wed, 27 Dec 2023 20:51:47 +0200 Subject: [PATCH] Fixed a couple runtime errors --- project/Aki.Core/Patches/TransportPrefixPatch.cs | 4 +--- .../Patches/ScavMode/LoadOfflineRaidScreenPatch.cs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/project/Aki.Core/Patches/TransportPrefixPatch.cs b/project/Aki.Core/Patches/TransportPrefixPatch.cs index 682182e..16d63db 100644 --- a/project/Aki.Core/Patches/TransportPrefixPatch.cs +++ b/project/Aki.Core/Patches/TransportPrefixPatch.cs @@ -15,9 +15,7 @@ namespace Aki.Core.Patches { try { - // NOTE: This doesn't actually check the below, GClass vs Class - _ = GClass259.DEBUG_LOGIC; // UPDATE BELOW LINE TOO - var type = PatchConstants.EftTypes.Single(t => t.Name == "Class259"); + var type = PatchConstants.EftTypes.SingleOrDefault(t => t.GetField("TransportPrefixes") != null); if (type == null) { diff --git a/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs b/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs index 92082a7..c94fbc0 100644 --- a/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs +++ b/project/Aki.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs @@ -48,7 +48,7 @@ namespace Aki.SinglePlayer.Patches.ScavMode protected override MethodBase GetTargetMethod() { // `MatchMakerSelectionLocationScreen` OnShowNextScreen - return typeof(MainMenuController).GetMethod("method_66", PatchConstants.PrivateFlags); + return typeof(MainMenuController).GetMethod("method_68", PatchConstants.PrivateFlags); } [PatchTranspiler]