Fix bulk offers market prices multiply by count for bulk offers, v1.6.1

This commit is contained in:
Tyfon
2024-05-29 16:38:28 -07:00
parent 6c1bb5d484
commit adc8c565cd
5 changed files with 26 additions and 10 deletions

3
R.cs
View File

@@ -442,14 +442,17 @@ namespace UIFixes
{
public static Type Type { get; private set; }
private static FieldInfo RagfairField;
private static FieldInfo BulkOfferField;
public static void InitTypes()
{
Type = typeof(EFT.UI.Ragfair.AddOfferWindow);
RagfairField = AccessTools.GetDeclaredFields(Type).First(t => t.FieldType == typeof(RagFairClass));
BulkOfferField = AccessTools.Field(Type, "bool_0");
}
public RagFairClass Ragfair { get { return (RagFairClass)RagfairField.GetValue(Value); } }
public bool BulkOffer { get { return (bool)BulkOfferField.GetValue(Value); } }
}
public class ItemUiContext(object value) : Wrapper(value)