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.
This commit is contained in:
Kelsi 2026-03-17 19:16:02 -07:00
parent f9947300da
commit b8712f380d

View file

@ -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;