Core/Players: Don't count empty bag slots (slots where you equip bags) as free inventory slots

This commit is contained in:
Luzifix
2026-02-21 18:59:41 +01:00
committed by Shauren
parent 5f0491c8d3
commit fff6783ca9

View File

@@ -9492,7 +9492,7 @@ uint32 Player::GetFreeInventorySlotCount(EnumFlag<ItemSearchLocation> location /
if (location.HasFlag(ItemSearchLocation::Inventory))
{
uint8 inventoryEnd = INVENTORY_SLOT_ITEM_START + GetInventorySlotCount();
for (uint8 i = INVENTORY_SLOT_BAG_START; i < inventoryEnd; ++i)
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < inventoryEnd; ++i)
if (!GetItemByPos(INVENTORY_SLOT_BAG_0, i))
++freeSlotCount;