Fixed bug where trying to buy-x too many items from a shop would not fill available inventory slots

This commit is contained in:
Ceikry
2022-06-29 12:29:37 +00:00
committed by Ryan
parent f29d7e37de
commit c23c7d0617
@@ -258,6 +258,8 @@ class Shop(val title: String, val stock: Array<ShopItem>, val general: Boolean =
val item = Item(inStock.id, amount)
if(inStock.amount < amount)
item.amount = inStock.amount
if (item.amount > player.inventory.getMaximumAdd(item))
item.amount = player.inventory.getMaximumAdd(item)
if(inStock.amount == 0) {
sendMessage(player, "This item is out of stock.")