Ensured BuyRestrictionMax is an integer
This commit is contained in:
parent
b7bd6bea9b
commit
2546f6f00c
@ -54,6 +54,11 @@ namespace AssortGenerator
|
||||
var barterSchemeJson = dataObject.GetProperty("barter_scheme").ToString();
|
||||
var barterSchemeItems = JsonSerializer.Deserialize<Dictionary<string, List<List<BarterObject>>>>(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<Dictionary<string, int>>(loyaltyLevelItemsJson);
|
||||
|
Loading…
x
Reference in New Issue
Block a user