mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:10:44 -05:00
23 lines
578 B
C#
23 lines
578 B
C#
using SPT.Reflection.Patching;
|
|
using SPT.SinglePlayer.Utils.TraderServices;
|
|
using EFT;
|
|
using HarmonyLib;
|
|
using System.Reflection;
|
|
|
|
namespace SPT.Custom.Patches
|
|
{
|
|
public class ResetTraderServicesPatch : ModulePatch
|
|
{
|
|
protected override MethodBase GetTargetMethod()
|
|
{
|
|
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.Stop));
|
|
}
|
|
|
|
[PatchPrefix]
|
|
private static void PatchPrefix()
|
|
{
|
|
TraderServicesManager.Instance.Clear();
|
|
}
|
|
}
|
|
}
|