mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Fix] Add check for simultaneous direct vendor and parcel Trader/Buyer Purchase (#4778)
This commit is contained in:
@@ -1894,6 +1894,13 @@ void Client::SellToBuyer(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
|
||||
if (sell_line.purchase_method == BarterInBazaar && buyer->IsThereACustomer()) {
|
||||
auto customer = entity_list.GetClientByID(buyer->GetCustomerID());
|
||||
if (customer) {
|
||||
customer->CancelBuyerTradeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
if (!DoBarterBuyerChecks(sell_line)) {
|
||||
return;
|
||||
};
|
||||
@@ -3825,3 +3832,18 @@ bool Client::DoBarterSellerChecks(BuyerLineSellItem_Struct &sell_line)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Client::CancelBuyerTradeWindow()
|
||||
{
|
||||
auto end_session = new EQApplicationPacket(OP_Barter, sizeof(BuyerRemoveItemFromMerchantWindow_Struct));
|
||||
auto data = reinterpret_cast<BuyerRemoveItemFromMerchantWindow_Struct *>(end_session->pBuffer);
|
||||
data->action = Barter_BuyerInspectBegin;
|
||||
|
||||
FastQueuePacket(&end_session);
|
||||
}
|
||||
|
||||
void Client::CancelTraderTradeWindow()
|
||||
{
|
||||
auto end_session = new EQApplicationPacket(OP_ShopEnd);
|
||||
FastQueuePacket(&end_session);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user