When stack size is 0 and buyRestrictionMax is > default stack size, use that value instead
This commit is contained in:
parent
b839987cd4
commit
5ac7299fbe
@ -61,9 +61,21 @@ namespace AssortGenerator
|
||||
.Where(item => item.upd?.StackObjectsCount == 0 && item.slotId == "hideout"))
|
||||
{
|
||||
LoggingHelpers.LogError($"item {item._tpl} found with stack count of 0, changing to {defaultStackSize}");
|
||||
|
||||
if (item.upd?.BuyRestrictionMax != null)
|
||||
{
|
||||
var parsedRestrictionMax = int.Parse(item.upd?.BuyRestrictionMax.ToString());
|
||||
if (parsedRestrictionMax > defaultStackSize)
|
||||
{
|
||||
item.upd.StackObjectsCount = parsedRestrictionMax;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.upd.StackObjectsCount = defaultStackSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void FixFullyPurchasedStackLimits(List<Item> items)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user