1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-06-10 17:57:46 +00:00

Check max stack size

This commit is contained in:
Rushi 2022-02-18 02:37:04 +01:00
parent d5e964ea4c
commit a45d8b9271

View file

@ -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();