From 20d3ab2ac588965c3cdfa528811b4491a131f13b Mon Sep 17 00:00:00 2001 From: Mitch Freeman <65987027+neckkola@users.noreply.github.com> Date: Fri, 8 Nov 2024 23:15:12 -0400 Subject: [PATCH] [Bug Fix] Bazaar two edge case issues resolved (#4533) This update resolves two bazaar issues that have been reported. - If parcel delivery is used to purchase an item, and the seller has several of the same items, that have various charges, the item would not be removed from the db. This allowed for incorrect purchases. - If a player 'reclaims' an alt currency item that they also have for sale with an active trader, the item would remain for sale, and be reclaimed. This impacted custom alt currency items that were no trade. --- zone/client_packet.cpp | 8 ++++++++ zone/trading.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 83af9b13d..14ee222f3 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -2731,6 +2731,14 @@ void Client::Handle_OP_AltCurrencyReclaim(const EQApplicationPacket *app) return; } + if (IsTrader()) { + TraderEndTrader(); + } + + if (IsBuyer()) { + ToggleBuyerMode(false); + } + /* Item to Currency Storage */ if (reclaim->reclaim_flag == 1) { uint32 removed = NukeItem(item_id, invWhereWorn | invWherePersonal | invWhereCursor); diff --git a/zone/trading.cpp b/zone/trading.cpp index ac36f014f..ac142319e 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -3497,7 +3497,7 @@ void Client::BuyTraderItemOutsideBazaar(TraderBuy_Struct *tbs, const EQApplicati ps.item_slot = parcel_out.slot_id; strn0cpy(ps.send_to, GetCleanName(), sizeof(ps.send_to)); - if (trader_item.item_charges <= static_cast(tbs->quantity)) { + if (trader_item.item_charges <= static_cast(tbs->quantity) || !buy_item->IsStackable()) { TraderRepository::DeleteOne(database, trader_item.id); } else { TraderRepository::UpdateQuantity(