From 81d5929e0862ac1cdfb8ef29a2888ab4cf793c9a Mon Sep 17 00:00:00 2001 From: collett Date: Fri, 3 Jan 2020 01:07:42 +0900 Subject: [PATCH] Fix item dupe. --- src/world/Actor/PlayerInventory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index 211d2f40..d70fd5a3 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -593,6 +593,10 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( uint32_t catalogId, uint32_ quantity = newStackSize - maxStack; newStackSize = maxStack; } + else + { + quantity = 0; + } item->setStackSize( newStackSize ); writeItem( item );