2024-05-21 19:10:17 +01:00
|
|
|
|
using SPT.Common.Http;
|
|
|
|
|
using SPT.Reflection.Patching;
|
2023-03-03 18:52:31 +00:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
using EFT;
|
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.Custom.Patches
|
2023-03-03 18:52:31 +00:00
|
|
|
|
{
|
|
|
|
|
public class QTEPatch : ModulePatch
|
|
|
|
|
{
|
2024-01-13 22:08:29 +00:00
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
|
|
|
|
return AccessTools.Method(typeof(HideoutPlayerOwner), nameof(HideoutPlayerOwner.StopWorkout));
|
|
|
|
|
}
|
2023-03-03 18:52:31 +00:00
|
|
|
|
|
|
|
|
|
[PatchPostfix]
|
2024-08-02 16:57:59 +01:00
|
|
|
|
public static void PatchPostfix(HideoutPlayerOwner __instance)
|
2023-03-03 18:52:31 +00:00
|
|
|
|
{
|
|
|
|
|
RequestHandler.PutJson("/client/hideout/workout", new
|
|
|
|
|
{
|
2024-11-27 07:04:11 -05:00
|
|
|
|
skills = new GClass1956(__instance.HideoutPlayer.Skills)
|
2023-03-03 18:52:31 +00:00
|
|
|
|
}
|
|
|
|
|
.ToJson());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|