mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
f9947300da
commit
b8712f380d
1 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue