2024-01-23 08:47:09 +00:00
|
|
|
|
using Aki.Custom.BTR.Utils;
|
2024-01-08 08:53:35 +00:00
|
|
|
|
using Aki.Reflection.Patching;
|
2024-01-15 09:09:31 +00:00
|
|
|
|
using Aki.SinglePlayer.Utils.TraderServices;
|
2024-01-08 08:53:35 +00:00
|
|
|
|
using EFT.UI;
|
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
2024-01-23 08:47:09 +00:00
|
|
|
|
namespace Aki.Custom.BTR.Patches
|
2024-01-08 08:53:35 +00:00
|
|
|
|
{
|
2024-01-23 08:47:09 +00:00
|
|
|
|
public class BTRTransferItemsPatch : ModulePatch
|
2024-01-08 08:53:35 +00:00
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
|
|
|
|
|
2024-01-14 09:05:13 +00:00
|
|
|
|
return AccessTools.Method(typeof(TransferItemsInRaidScreen), nameof(TransferItemsInRaidScreen.Close));
|
2024-01-08 08:53:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPostfix]
|
2024-01-20 09:20:32 +00:00
|
|
|
|
private static void PatchPostfix(bool ___bool_1)
|
2024-01-08 08:53:35 +00:00
|
|
|
|
{
|
|
|
|
|
// Didn't extract items
|
|
|
|
|
if (!___bool_1)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update the trader services information now that we've used this service
|
2024-01-15 09:09:31 +00:00
|
|
|
|
TraderServicesManager.Instance.GetTraderServicesDataFromServer(BTRUtil.BTRTraderId);
|
2024-01-08 08:53:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|