From 9f49f543f6ae4876983cfbc06ec44e379d70fbf1 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 20 Mar 2026 20:57:23 -0700 Subject: [PATCH] feat: show random suffix names in auction outbid and expired notifications Apply getRandomPropertyName() to SMSG_AUCTION_BIDDER_NOTIFICATION and SMSG_AUCTION_REMOVED_NOTIFICATION so outbid/expired messages show full item names like "You have been outbid on Leggings of the Eagle" instead of just "Leggings". Completes suffix name resolution across all AH contexts. --- src/game/game_handler.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 26bef831..050f9380 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -6228,14 +6228,21 @@ void GameHandler::handlePacket(network::Packet& packet) { break; } case Opcode::SMSG_AUCTION_BIDDER_NOTIFICATION: { - // auctionId(u32) + itemEntry(u32) + ... + // auctionHouseId(u32) + auctionId(u32) + bidderGuid(u64) + bidAmount(u32) + outbidAmount(u32) + itemEntry(u32) + randomPropertyId(u32) if (packet.getSize() - packet.getReadPos() >= 8) { - uint32_t auctionId = packet.readUInt32(); + /*uint32_t auctionId =*/ packet.readUInt32(); uint32_t itemEntry = packet.readUInt32(); - (void)auctionId; + int32_t bidRandProp = 0; + // Try to read randomPropertyId if enough data remains + if (packet.getSize() - packet.getReadPos() >= 4) + bidRandProp = static_cast(packet.readUInt32()); ensureItemInfo(itemEntry); auto* info = getItemInfo(itemEntry); std::string rawName2 = info && !info->name.empty() ? info->name : ("Item #" + std::to_string(itemEntry)); + if (bidRandProp != 0) { + std::string suffix = getRandomPropertyName(bidRandProp); + if (!suffix.empty()) rawName2 += " " + suffix; + } uint32_t bidQuality = info ? info->quality : 1u; std::string bidLink = buildItemLink(itemEntry, bidQuality, rawName2); addSystemChatMessage("You have been outbid on " + bidLink + "."); @@ -6248,10 +6255,14 @@ void GameHandler::handlePacket(network::Packet& packet) { if (packet.getSize() - packet.getReadPos() >= 12) { /*uint32_t auctionId =*/ packet.readUInt32(); uint32_t itemEntry = packet.readUInt32(); - /*uint32_t itemRandom =*/ packet.readUInt32(); + int32_t itemRandom = static_cast(packet.readUInt32()); ensureItemInfo(itemEntry); auto* info = getItemInfo(itemEntry); std::string rawName3 = info && !info->name.empty() ? info->name : ("Item #" + std::to_string(itemEntry)); + if (itemRandom != 0) { + std::string suffix = getRandomPropertyName(itemRandom); + if (!suffix.empty()) rawName3 += " " + suffix; + } uint32_t remQuality = info ? info->quality : 1u; std::string remLink = buildItemLink(itemEntry, remQuality, rawName3); addSystemChatMessage("Your auction of " + remLink + " has expired.");