2024-05-21 19:10:17 +01:00
|
|
|
using SPT.Reflection.Patching;
|
2023-03-03 18:52:31 +00:00
|
|
|
using EFT.UI.SessionEnd;
|
|
|
|
using System.Reflection;
|
2024-01-13 22:08:29 +00:00
|
|
|
using EFT;
|
|
|
|
using HarmonyLib;
|
2023-03-03 18:52:31 +00:00
|
|
|
|
2024-05-21 19:10:17 +01:00
|
|
|
namespace SPT.SinglePlayer.Patches.Progression
|
2023-03-03 18:52:31 +00:00
|
|
|
{
|
|
|
|
public class ExperienceGainPatch : ModulePatch
|
|
|
|
{
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
{
|
2024-01-13 22:08:29 +00:00
|
|
|
return AccessTools.Method(typeof(SessionResultExperienceCount), nameof(SessionResultExperienceCount.Show), new []{ typeof(Profile), typeof(bool), typeof(ExitStatus) });
|
2023-03-03 18:52:31 +00:00
|
|
|
}
|
2024-01-13 22:08:29 +00:00
|
|
|
|
2023-03-03 18:52:31 +00:00
|
|
|
[PatchPrefix]
|
|
|
|
private static void PatchPrefix(ref bool isOnline)
|
|
|
|
{
|
|
|
|
isOnline = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
[PatchPostfix]
|
|
|
|
private static void PatchPostfix(ref bool isOnline)
|
|
|
|
{
|
|
|
|
isOnline = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|