[Fix] Add check for simultaneous direct vendor and parcel Trader/Buyer Purchase (#4778)

This commit is contained in:
Mitch Freeman
2025-03-14 00:30:00 -03:00
committed by GitHub
parent 3c2545cfaf
commit e93785f885
4 changed files with 38 additions and 1 deletions
+13
View File
@@ -3786,6 +3786,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
return;
}
if (trader_pc->IsThereACustomer()) {
auto customer = entity_list.GetClientByID(trader_pc->GetCustomerID());
if (customer) {
customer->CancelTraderTradeWindow();
}
}
auto item_sn = Strings::ToUnsignedBigInt(in->trader_buy_struct.serial_number);
auto outapp = std::make_unique<EQApplicationPacket>(OP_Trader, sizeof(TraderBuy_Struct));
auto data = (TraderBuy_Struct *) outapp->pBuffer;
@@ -3981,6 +3988,12 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
worldserver.SendPacket(pack);
return;
}
if (buyer->IsThereACustomer()) {
auto customer = entity_list.GetClientByID(buyer->GetCustomerID());
if (customer) {
customer->CancelBuyerTradeWindow();
}
}
BuyerLineSellItem_Struct sell_line{};
sell_line.item_id = in->buy_item_id;