mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
29 lines
755 B
C#
29 lines
755 B
C#
using SPT.Reflection.Patching;
|
|
using EFT.UI.SessionEnd;
|
|
using System.Reflection;
|
|
using EFT;
|
|
using HarmonyLib;
|
|
|
|
namespace SPT.SinglePlayer.Patches.Progression
|
|
{
|
|
public class ExperienceGainPatch : ModulePatch
|
|
{
|
|
protected override MethodBase GetTargetMethod()
|
|
{
|
|
return AccessTools.Method(typeof(SessionResultExperienceCount), nameof(SessionResultExperienceCount.Show), new []{ typeof(Profile), typeof(bool), typeof(ExitStatus) });
|
|
}
|
|
|
|
[PatchPrefix]
|
|
private static void PatchPrefix(ref bool isOnline)
|
|
{
|
|
isOnline = false;
|
|
}
|
|
|
|
[PatchPostfix]
|
|
private static void PatchPostfix(ref bool isOnline)
|
|
{
|
|
isOnline = true;
|
|
}
|
|
}
|
|
}
|