This commit is contained in:
Mitch Freeman
2025-04-17 22:37:22 -03:00
parent 125457afe6
commit 93c38f5e24
6 changed files with 271 additions and 191 deletions
+16 -14
View File
@@ -1674,21 +1674,23 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
break;
}
case ServerOP_BazaarPurchase: {
auto in = (BazaarPurchaseMessaging_Struct *)pack->pBuffer;
if (in->trader_buy_struct.trader_id <= 0) {
LogTrading(
"World Message [{}] received with invalid trader_id [{}]",
"ServerOP_BazaarPurchase",
in->trader_buy_struct.trader_id
);
return;
auto in = reinterpret_cast<BazaarPurchaseMessaging_Struct *>(pack->pBuffer);
switch (in->transaction_status) {
case BazaarPurchaseBuyerCompleteSendToSeller: {
zoneserver_list.SendPacket(in->trader_zone_id, in->trader_zone_instance_id, pack);
break;
}
case BazaarPurchaseTraderFailed:
case BazaarPurchaseSuccess: {
zoneserver_list.SendPacket(in->buyer_zone_id, in->buyer_zone_instance_id, pack);
break;
}
default: {
LogError(
"ServerOP_BazaarPurchase received with no corresponding action for [{}]",
in->transaction_status);
}
}
auto trader = ClientList::Instance()->FindCLEByCharacterID(in->trader_buy_struct.trader_id);
if (trader) {
ZSList::Instance()->SendPacket(in->trader_zone_id, in->trader_zone_instance_id, pack);
}
break;
}
case ServerOP_BuyerMessaging: {