This commit is contained in:
Mitch Freeman
2025-04-15 21:39:35 -03:00
parent 885b472340
commit 125457afe6
4 changed files with 135 additions and 28 deletions
+15 -1
View File
@@ -245,6 +245,21 @@ public:
return trader_item.at(0);
}
static Trader GetItemByItemUniqueNumber(Database &db, const char* item_unique_id)
{
Trader e{};
const auto trader_item = GetWhere(
db,
fmt::format("`item_unique_id` = '{}' LIMIT 1", item_unique_id)
);
if (trader_item.empty()) {
return e;
}
return trader_item.at(0);
}
static int UpdateActiveTransaction(Database &db, uint32 id, bool status)
{
auto e = FindOne(db, id);
@@ -338,7 +353,6 @@ public:
"trader.char_zone_instance_id, trader.active_transaction, c.`name` FROM `trader` "
"INNER JOIN character_data AS c ON trader.character_id = c.id "
"WHERE {} "
"GROUP BY trader.item_id "
"ORDER BY trader.character_id ASC",
search_criteria_trader
);
+12 -1
View File
@@ -368,6 +368,14 @@ enum {
UserToWorldStatusAlreadyOnline = -4
};
enum {
BazaarPurchaseFailed = 0,
BazaarPurchaseSuccess = 1,
BazaarPurchaseSellerFailed = 2,
BazaarPurchaseSellerSuccess = 3,
BazaarPurchaseBuyerFailed = 4,
BazaarPurchaseBuyerSuccess = 5
};
/************ PACKET RELATED STRUCT ************/
class ServerPacket
{
@@ -1775,8 +1783,11 @@ struct BazaarPurchaseMessaging_Struct {
uint32 item_aug_5;
uint32 item_aug_6;
uint32 buyer_id;
uint32 item_quantity_available;
uint32 item_charges;
uint32 id;
uint32 trader_zone_id;
uint32 trader_zone_instance_id;
uint32 transaction_status;
};