2024-05-21 19:10:17 +01:00
|
|
|
using SPT.Core.Utils;
|
|
|
|
using SPT.Reflection.Patching;
|
2023-03-03 18:52:31 +00:00
|
|
|
using System.Reflection;
|
|
|
|
using System.Threading.Tasks;
|
2024-01-13 22:08:29 +00:00
|
|
|
using HarmonyLib;
|
2023-03-03 18:52:31 +00:00
|
|
|
|
2024-05-21 19:10:17 +01:00
|
|
|
namespace SPT.Core.Patches
|
2023-03-03 18:52:31 +00:00
|
|
|
{
|
|
|
|
public class BattlEyePatch : ModulePatch
|
|
|
|
{
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
{
|
2024-01-13 22:08:29 +00:00
|
|
|
return AccessTools.Method(typeof(BattleeyePatchClass), nameof(BattleeyePatchClass.RunValidation));
|
2023-03-03 18:52:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[PatchPrefix]
|
|
|
|
private static bool PatchPrefix(ref Task __result, ref bool ___bool_0)
|
|
|
|
{
|
|
|
|
___bool_0 = ValidationUtil.Validate();
|
|
|
|
__result = Task.CompletedTask;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|