From a45d8b9271b07015b4eaf269b1a666de87fbb8cb Mon Sep 17 00:00:00 2001 From: Rushi <44952533+Skyliegirl33@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:37:04 +0100 Subject: [PATCH] Check max stack size --- src/world/Actor/PlayerInventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index 75f8b59d..9f4b8585 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -617,7 +617,7 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( uint32_t catalogId, uint32_ auto item = storage->getItem( slot ); // add any items that are stackable - if( canMerge && item && itemInfo->data().Slot > 0 && item->getId() == catalogId ) + if( canMerge && item && item->getMaxStackSize() > 0 && item->getId() == catalogId ) { uint32_t count = item->getStackSize(); uint32_t maxStack = item->getMaxStackSize();