From 5676c58fce6cf7d12607976baee33d490d117693 Mon Sep 17 00:00:00 2001 From: kiobu Date: Wed, 1 May 2024 08:17:57 +0000 Subject: [PATCH] fix: disablepve in-raid bug when finding tooltip (!119) should fix https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/640 Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/119 Co-authored-by: kiobu Co-committed-by: kiobu --- project/Aki.Custom/Patches/DisablePvEPatch.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/Aki.Custom/Patches/DisablePvEPatch.cs b/project/Aki.Custom/Patches/DisablePvEPatch.cs index b5ece0f..afe0b90 100644 --- a/project/Aki.Custom/Patches/DisablePvEPatch.cs +++ b/project/Aki.Custom/Patches/DisablePvEPatch.cs @@ -21,7 +21,8 @@ namespace Aki.Custom.Patches private static bool PatchPrefix(ESessionMode sessionMode, Profile profile, ref GameObject ____notAvailableState) { ____notAvailableState.SetActive(true); - Object.FindObjectsOfType().Where(o => o.name == "Locked").Single().SetMessageText("SPT-AKI is already PvE."); + Object.FindObjectsOfType().Where(o => o.name == "Locked").SingleOrDefault()?.SetMessageText("SPT-AKI is already PvE."); + return false; } }