From e8ebabe025c8009f3e0b556dec027da5972e5972 Mon Sep 17 00:00:00 2001 From: collett Date: Fri, 3 Jan 2020 01:07:42 +0900 Subject: [PATCH] Fix item being added more than once when there is already a stack of the same item. --- src/world/Actor/PlayerInventory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index 211d2f40..fe680fc5 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -593,6 +593,8 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( uint32_t catalogId, uint32_ quantity = newStackSize - maxStack; newStackSize = maxStack; } + else + quantity = 0; item->setStackSize( newStackSize ); writeItem( item );