From d3397341438bc66aa68351f6291ff2459bf6518d Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Mar 2026 22:45:06 -0700 Subject: [PATCH] =?UTF-8?q?game:=20fix=20LFG=20reward=20money=20display=20?= =?UTF-8?q?(copper=E2=86=92gold/silver/copper)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SMSG_LFG_PLAYER_REWARD handler was printing raw copper value with a "g" suffix (e.g. "12345g") instead of converting to gold/silver/copper. Now formats as "1g 23s 45c" matching the standard WoW convention. --- src/game/game_handler.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 644f7f09..ec1709d3 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -11411,8 +11411,20 @@ void GameHandler::handleLfgPlayerReward(network::Packet& packet) { uint32_t money = packet.readUInt32(); uint32_t xp = packet.readUInt32(); - std::string rewardMsg = "Dungeon Finder reward: " + std::to_string(money) + "g " + - std::to_string(xp) + " XP"; + // Convert copper to gold/silver/copper + uint32_t gold = money / 10000; + uint32_t silver = (money % 10000) / 100; + uint32_t copper = money % 100; + char moneyBuf[64]; + if (gold > 0) + snprintf(moneyBuf, sizeof(moneyBuf), "%ug %us %uc", gold, silver, copper); + else if (silver > 0) + snprintf(moneyBuf, sizeof(moneyBuf), "%us %uc", silver, copper); + else + snprintf(moneyBuf, sizeof(moneyBuf), "%uc", copper); + + std::string rewardMsg = std::string("Dungeon Finder reward: ") + moneyBuf + + ", " + std::to_string(xp) + " XP"; if (packet.getSize() - packet.getReadPos() >= 4) { uint32_t rewardCount = packet.readUInt32();