mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Fix] Corrected issue with bazaar purchase via parcels where an incorrect quantity would be calculated. (#4352)
This commit is contained in:
parent
992a5cc132
commit
d810cb02c3
@ -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)) {
|
||||
|
||||
@ -3974,12 +3974,6 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
data->price = in->trader_buy_struct.price * in->trader_buy_struct.quantity;
|
||||
}
|
||||
|
||||
TraderRepository::UpdateQuantity(
|
||||
database,
|
||||
trader_pc->CharacterID(),
|
||||
item_sn,
|
||||
in->item_quantity_available - in->trader_buy_struct.quantity
|
||||
);
|
||||
TraderRepository::UpdateActiveTransaction(database, in->id, false);
|
||||
|
||||
trader_pc->RemoveItemBySerialNumber(item_sn, in->trader_buy_struct.quantity);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user