2024-05-21 19:10:17 +01:00
|
|
|
|
using SPT.Reflection.Patching;
|
|
|
|
|
using SPT.SinglePlayer.Utils.TraderServices;
|
2024-02-12 09:22:45 +00:00
|
|
|
|
using EFT;
|
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
2024-05-21 19:10:17 +01:00
|
|
|
|
namespace SPT.Custom.Patches
|
2024-02-12 09:22:45 +00:00
|
|
|
|
{
|
|
|
|
|
public class ResetTraderServicesPatch : ModulePatch
|
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
2024-04-03 15:38:14 +01:00
|
|
|
|
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.Stop));
|
2024-02-12 09:22:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPrefix]
|
|
|
|
|
private static void PatchPrefix()
|
|
|
|
|
{
|
|
|
|
|
TraderServicesManager.Instance.Clear();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|