[Fix] Fix for mult-instanced bazaar zones (#4541)

* Enable bazaar for multiple instances.

* Enable buyer for multiple instances.

* Update to buyer/barter for multiple instances and attuned items.
This commit is contained in:
Mitch Freeman
2024-11-14 21:44:03 -04:00
committed by GitHub
parent d3da2e5501
commit 9967384ab8
4 changed files with 26 additions and 3 deletions
+9
View File
@@ -2606,6 +2606,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app)
data->zone_id = GetZoneID();
data->slot = sell_line.slot;
data->seller_quantity = sell_line.seller_quantity;
data->purchase_method = sell_line.purchase_method;
strn0cpy(data->item_name, sell_line.item_name, sizeof(data->item_name));
strn0cpy(data->buyer_name, sell_line.buyer_name.c_str(), sizeof(data->buyer_name));
strn0cpy(data->seller_name, GetCleanName(), sizeof(data->seller_name));
@@ -4252,6 +4253,14 @@ bool Client::DoBarterSellerChecks(BuyerLineSellItem_Struct &sell_line)
Message(Chat::Red, "The item that you are trying to sell is augmented. Please remove augments first");
}
if (sell_item && !sell_item->IsDroppable()) {
seller_error = true;
LogTradingDetail("Seller item <red>[{}] is non-tradeable therefore cannot be sold.",
sell_line.item_name
);
Message(Chat::Red, "The item that you are trying to sell is non-tradeable and therefore cannot be sold.");
}
if (seller_error) {
LogTradingDetail("Seller Error <red>[{}] Barter Sell/Buy Transaction Failed.", seller_error);
SendBarterBuyerClientMessage(sell_line, Barter_SellerTransactionComplete, Barter_Failure, Barter_Failure);