From 05ac8499df6a27d78b70b878a55e9f02b3efd77b Mon Sep 17 00:00:00 2001 From: Noudess Date: Fri, 10 Sep 2021 10:18:59 -0400 Subject: [PATCH] Fix bug where stacks of non-stackable items are removed when you buy 1. --- zone/zone.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/zone.cpp b/zone/zone.cpp index 709803aab..a9943dcf0 100755 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -361,7 +361,8 @@ void Zone::DumpMerchantList(uint32 npcid) { int Zone::SaveTempItem(uint32 merchantid, uint32 npcid, uint32 item, int32 charges, bool sold) { - LogInventory("Transaction of [{}] [{}]", charges, item); + LogInventory("[{}] [{}] charges of [{}]", ((sold) ? "Sold" : "Bought"), + charges, item); //DumpMerchantList(npcid); // Iterate past main items. // If the item being transacted is in this list, return 0; @@ -419,8 +420,7 @@ int Zone::SaveTempItem(uint32 merchantid, uint32 npcid, uint32 item, int32 charg if (!ml.origslot) { ml.origslot = ml.slot; } - bool is_stackable = database.GetItem(item)->Stackable; - if ((is_stackable && charges > 0) || (!is_stackable && sold)) { + if (ml.charges > 0) { database.SaveMerchantTemp(npcid, ml.origslot, item, ml.charges); tmp_merlist.push_back(ml); } else {