[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.
This commit is contained in:
Mitch Freeman
2024-11-08 23:15:12 -04:00
committed by GitHub
parent 0ea47fadee
commit 20d3ab2ac5
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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<int32>(tbs->quantity)) {
if (trader_item.item_charges <= static_cast<int32>(tbs->quantity) || !buy_item->IsStackable()) {
TraderRepository::DeleteOne(database, trader_item.id);
} else {
TraderRepository::UpdateQuantity(