Vendor buyback inventory

Fixed vendor buyback inventory so it properly scrolls when the player adds enough items to it.
This commit is contained in:
EmosewaMC 2022-04-23 04:16:10 -07:00
parent d0233a2cd0
commit 0eece14b68
2 changed files with 7 additions and 5 deletions

View File

@ -88,7 +88,9 @@ Inventory* InventoryComponent::GetInventory(const eInventoryType type)
case eInventoryType::VAULT_ITEMS:
size = 40u;
break;
case eInventoryType::VENDOR_BUYBACK:
size = 27u;
break;
default:
break;
}

View File

@ -90,17 +90,17 @@ int32_t Inventory::FindEmptySlot()
{
if (free <= 6) // Up from 1
{
if (type != ITEMS && type != VAULT_ITEMS)
if (type != ITEMS && type != VAULT_ITEMS && type != eInventoryType::VAULT_MODELS)
{
uint32_t newSize = size;
if (type == MODELS || type == VAULT_MODELS)
if (type == MODELS)
{
newSize = 240;
}
else
else if (type == eInventoryType::VENDOR_BUYBACK)
{
newSize += 20;
newSize += 9u;
}
if (newSize > GetSize())