feat: show hearthstone bind zone name in tooltip instead of continent

This commit is contained in:
Kelsi 2026-03-13 10:18:31 -07:00
parent b03c326bcd
commit cc24597983
3 changed files with 20 additions and 7 deletions

View file

@ -6815,14 +6815,24 @@ void GameScreen::renderActionBar(game::GameHandler& gameHandler) {
if (slot.id == 8690) {
uint32_t mapId = 0; glm::vec3 pos;
if (gameHandler.getHomeBind(mapId, pos)) {
const char* mapName = "Unknown";
switch (mapId) {
case 0: mapName = "Eastern Kingdoms"; break;
case 1: mapName = "Kalimdor"; break;
case 530: mapName = "Outland"; break;
case 571: mapName = "Northrend"; break;
std::string homeLocation;
// Zone name (from zoneId stored in bind point)
uint32_t zoneId = gameHandler.getHomeBindZoneId();
if (zoneId != 0) {
homeLocation = gameHandler.getWhoAreaName(zoneId);
}
ImGui::TextColored(ImVec4(0.8f, 0.9f, 1.0f, 1.0f), "Home: %s", mapName);
// Fall back to continent name if zone unavailable
if (homeLocation.empty()) {
switch (mapId) {
case 0: homeLocation = "Eastern Kingdoms"; break;
case 1: homeLocation = "Kalimdor"; break;
case 530: homeLocation = "Outland"; break;
case 571: homeLocation = "Northrend"; break;
default: homeLocation = "Unknown"; break;
}
}
ImGui::TextColored(ImVec4(0.8f, 0.9f, 1.0f, 1.0f),
"Home: %s", homeLocation.c_str());
}
}
if (outOfRange) {