0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 08:30:45 -05:00
modules/project/SPT.Custom/Patches/FixBotgroupMarkofTheUnknown.cs

32 lines
860 B
C#

using HarmonyLib;
using SPT.Reflection.Patching;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace SPT.Custom.Patches
{
/// <summary>
/// If Scav war is turned on Botsgroup can be null for some reason if null return early to not softlock player.
/// </summary>
public class FixBotgroupMarkofTheUnknown : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(BotsGroupMarkOfUnknown), nameof(BotsGroupMarkOfUnknown.Dispose));
}
[PatchPrefix]
public static bool PatchPrefix(BotsGroup ____groups)
{
if (____groups == null)
{
return false;
}
return true;
}
}
}