mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[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:
parent
0ea47fadee
commit
20d3ab2ac5
@ -2731,6 +2731,14 @@ void Client::Handle_OP_AltCurrencyReclaim(const EQApplicationPacket *app)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsTrader()) {
|
||||||
|
TraderEndTrader();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsBuyer()) {
|
||||||
|
ToggleBuyerMode(false);
|
||||||
|
}
|
||||||
|
|
||||||
/* Item to Currency Storage */
|
/* Item to Currency Storage */
|
||||||
if (reclaim->reclaim_flag == 1) {
|
if (reclaim->reclaim_flag == 1) {
|
||||||
uint32 removed = NukeItem(item_id, invWhereWorn | invWherePersonal | invWhereCursor);
|
uint32 removed = NukeItem(item_id, invWhereWorn | invWherePersonal | invWhereCursor);
|
||||||
|
|||||||
@ -3497,7 +3497,7 @@ void Client::BuyTraderItemOutsideBazaar(TraderBuy_Struct *tbs, const EQApplicati
|
|||||||
ps.item_slot = parcel_out.slot_id;
|
ps.item_slot = parcel_out.slot_id;
|
||||||
strn0cpy(ps.send_to, GetCleanName(), sizeof(ps.send_to));
|
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);
|
TraderRepository::DeleteOne(database, trader_item.id);
|
||||||
} else {
|
} else {
|
||||||
TraderRepository::UpdateQuantity(
|
TraderRepository::UpdateQuantity(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user