mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-12 19:28:21 +00:00
Vendor buyback inventory
Fixed vendor buyback inventory so it properly scrolls when the player adds enough items to it.
This commit is contained in:
parent
d0233a2cd0
commit
0eece14b68
@ -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;
|
||||
}
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user