mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Fix] Corrected issue with bazaar purchase via parcels where an incorrect quantity would be calculated. (#4352)
This commit is contained in:
@@ -3555,6 +3555,17 @@ 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 == tbs->quantity) {
|
||||
TraderRepository::DeleteOne(database, trader_item.id);
|
||||
} else {
|
||||
TraderRepository::UpdateQuantity(
|
||||
database,
|
||||
trader_item.char_id,
|
||||
trader_item.item_sn,
|
||||
trader_item.item_charges - tbs->quantity
|
||||
);
|
||||
}
|
||||
|
||||
SendParcelDeliveryToWorld(ps);
|
||||
|
||||
if (RuleB(Bazaar, AuditTrail)) {
|
||||
|
||||
Reference in New Issue
Block a user