[Fix] Corrected issue with bazaar purchase via parcels where an incorrect quantity would be calculated. (#4352)

This commit is contained in:
Mitch Freeman
2024-05-27 18:06:30 -03:00
committed by GitHub
parent 992a5cc132
commit d810cb02c3
2 changed files with 11 additions and 6 deletions
+11
View File
@@ -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)) {