From 81431cfcbda58135293a7612f81dd7e774f7575a Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Sun, 12 Jun 2022 11:44:45 -0700 Subject: [PATCH] Address bricks selling 1 at a time Bricks have a stack size of zero in the cdclient so we need to make sure to give them a full stack size of 999 as we do for the bricks inventory with the selling inventory. --- dGame/dComponents/InventoryComponent.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dGame/dComponents/InventoryComponent.cpp b/dGame/dComponents/InventoryComponent.cpp index 8c5ec269..02ddd3c8 100644 --- a/dGame/dComponents/InventoryComponent.cpp +++ b/dGame/dComponents/InventoryComponent.cpp @@ -208,7 +208,8 @@ void InventoryComponent::AddItem( auto stack = static_cast(info.stackSize); - if (inventoryType == eInventoryType::BRICKS) + // info.itemType of 1 is item type brick + if (inventoryType == eInventoryType::BRICKS || (stack == 0 && info.itemType == 1)) { stack = 999; }