From b8712f380dc6833bebc68f7f83e96668f0cc643a Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 17 Mar 2026 19:16:02 -0700 Subject: [PATCH] fix: show sub-zone name in minimap label using server-reported zone ID The zone label above the minimap now preferentially uses the zone/area name from getWorldStateZoneId() (populated via SMSG_INIT_WORLD_STATES) rather than the renderer's map-level zone name. This means the label correctly shows "Ironforge", "Wailing Caverns", etc. instead of always showing the parent continent zone name. --- src/ui/game_screen.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index e26815e5..03a027dd 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -17572,8 +17572,15 @@ void GameScreen::renderMinimapMarkers(game::GameHandler& gameHandler) { }; // Zone name label above the minimap (centered, WoW-style) + // Prefer the server-reported zone/area name (from SMSG_INIT_WORLD_STATES) so sub-zones + // like Ironforge or Wailing Caverns display correctly; fall back to renderer zone name. { - const std::string& zoneName = renderer ? renderer->getCurrentZoneName() : std::string{}; + std::string wsZoneName; + uint32_t wsZoneId = gameHandler.getWorldStateZoneId(); + if (wsZoneId != 0) + wsZoneName = gameHandler.getWhoAreaName(wsZoneId); + const std::string& rendererZoneName = renderer ? renderer->getCurrentZoneName() : std::string{}; + const std::string& zoneName = !wsZoneName.empty() ? wsZoneName : rendererZoneName; if (!zoneName.empty()) { auto* fgDl = ImGui::GetForegroundDrawList(); float zoneTextY = centerY - mapRadius - 16.0f;