Fix tossing a stack of berries hiding following berries (#7571)
Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
parent
905bda386f
commit
60f5f3302d
@ -32,6 +32,7 @@ static bool32 CheckPyramidBagHasItem(u16 itemId, u16 count);
|
||||
static bool32 CheckPyramidBagHasSpace(u16 itemId, u16 count);
|
||||
static const u8 *GetItemPluralName(u16);
|
||||
static bool32 DoesItemHavePluralName(u16);
|
||||
static void NONNULL BagPocket_CompactItems(struct BagPocket *pocket);
|
||||
|
||||
EWRAM_DATA struct BagPocket gBagPockets[POCKETS_COUNT] = {0};
|
||||
|
||||
@ -391,6 +392,9 @@ static bool32 NONNULL BagPocket_RemoveItem(struct BagPocket *pocket, u16 itemId,
|
||||
}
|
||||
}
|
||||
|
||||
if (totalQuantity == count)
|
||||
BagPocket_CompactItems(pocket);
|
||||
|
||||
Free(tempPocketSlotQuantities);
|
||||
return totalQuantity >= count;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user