From 7c5d688c009596694eadd6e8ceb0094e6579ada7 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 11 Mar 2026 00:36:40 -0700 Subject: [PATCH] fix: show area name in SMSG_ZONE_UNDER_ATTACK system message Replace the raw area ID in the zone-under-attack message with the resolved area name from the zone manager, matching retail WoW behavior ('Hillsbrad Foothills is under attack!' instead of 'area 267'). --- src/game/game_handler.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index c6ee7dbc..e6e234c4 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -2826,10 +2826,11 @@ void GameHandler::handlePacket(network::Packet& packet) { // uint32 areaId if (packet.getSize() - packet.getReadPos() >= 4) { uint32_t areaId = packet.readUInt32(); - char buf[128]; - std::snprintf(buf, sizeof(buf), - "A zone is under attack! (area %u)", areaId); - addSystemChatMessage(buf); + std::string areaName = getAreaName(areaId); + std::string msg = areaName.empty() + ? std::string("A zone is under attack!") + : (areaName + " is under attack!"); + addSystemChatMessage(msg); } break; }