From 2546f6f00ca21ab96c864a7f6034852bb787b546 Mon Sep 17 00:00:00 2001 From: Chomp Date: Mon, 6 Jan 2025 12:37:33 +0000 Subject: [PATCH] Ensured BuyRestrictionMax is an integer --- AssortGenerator/Program.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AssortGenerator/Program.cs b/AssortGenerator/Program.cs index d99e086..7388804 100644 --- a/AssortGenerator/Program.cs +++ b/AssortGenerator/Program.cs @@ -54,6 +54,11 @@ namespace AssortGenerator var barterSchemeJson = dataObject.GetProperty("barter_scheme").ToString(); var barterSchemeItems = JsonSerializer.Deserialize>>>(barterSchemeJson); + foreach (var item in items.Where(item => item.upd?.BuyRestrictionMax is not null)) + { + item.upd.BuyRestrictionMax = int.Parse(item.upd.BuyRestrictionMax.ToString()); + } + // Find loyalty level node and parse into dictionary var loyaltyLevelItemsJson = dataObject.GetProperty("loyal_level_items").ToString(); var loyaltyLevelItems = JsonSerializer.Deserialize>(loyaltyLevelItemsJson);