0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 04:50:45 -05:00

Fixed LoadOfflineRaidScreenPatch

This commit is contained in:
Chomp 2024-12-26 21:45:39 +00:00
parent 97eb3ef6ee
commit 89b5b44558

View File

@ -32,7 +32,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode
_ = MatchmakerPlayerControllerClass.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
// `MatchmakerInsuranceScreen` OnShowNextScreen
_onReadyScreenMethod = AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_46));
_onReadyScreenMethod = AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_47));
_isLocalField = AccessTools.Field(typeof(MainMenuController), "bool_0");
_menuControllerField = typeof(TarkovApplication).GetFields(PatchConstants.PrivateFlags).FirstOrDefault(x => x.FieldType == typeof(MainMenuController));
@ -46,7 +46,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode
protected override MethodBase GetTargetMethod()
{
// `MatchMakerSelectionLocationScreen` OnShowNextScreen
return AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_73));
return AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_74));
}
[PatchTranspiler]
@ -131,7 +131,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;
// `MatchmakerOfflineRaidScreen` OnShowReadyScreen
gclass.OnShowReadyScreen += (OfflineRaidAction)Delegate.CreateDelegate(typeof(OfflineRaidAction), menuController, nameof(MainMenuController.method_77));
gclass.OnShowReadyScreen += (OfflineRaidAction)Delegate.CreateDelegate(typeof(OfflineRaidAction), menuController, nameof(MainMenuController.method_78));
gclass.ShowScreen(EScreenState.Queued);
}