2024-11-08 21:17:10 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using SPT.Reflection.Patching;
|
|
|
|
|
|
|
|
|
|
namespace LootValueEX.Patches
|
|
|
|
|
{
|
|
|
|
|
internal class TraderClassPatch : ModulePatch
|
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod() => typeof(TraderClass).GetConstructors().First();
|
|
|
|
|
|
|
|
|
|
[PatchPostfix]
|
|
|
|
|
private static void GenerateSupplyData(ref TraderClass __instance)
|
|
|
|
|
{
|
|
|
|
|
Plugin.Log.LogDebug($"Generating Assortment Data for trader {__instance.Id}");
|
2024-11-23 01:30:48 +01:00
|
|
|
|
__instance.RefreshAssortment(true, true);
|
2024-11-08 21:17:10 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|