eft-lootvalueex/Plugin/Patches/TraderClassPatch.cs
Yui db4003caa7
feat: get best trader offer for items
TODO: Make a better conversion for USD/EUR to RUB
2024-11-08 17:17:10 -03:00

23 lines
643 B
C#

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}");
__instance.RefreshAssortment(true, false);
}
}
}