feat: show guild name on target frame for players

Display <GuildName> below the player name in the target frame,
using the same guild name cache as nameplates.
This commit is contained in:
Kelsi 2026-03-18 09:48:03 -07:00
parent e572cdfb4a
commit 6aea48aea9

View file

@ -4182,6 +4182,17 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) {
}
}
// Player guild name (e.g. "<My Guild>") — mirrors NPC subtitle styling
if (target->getType() == game::ObjectType::PLAYER) {
uint32_t guildId = gameHandler.getEntityGuildId(target->getGuid());
if (guildId != 0) {
const std::string& gn = gameHandler.lookupGuildName(guildId);
if (!gn.empty()) {
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 0.9f), "<%s>", gn.c_str());
}
}
}
// Right-click context menu on the target name
if (ImGui::BeginPopupContextItem("##TargetNameCtx")) {
const bool isPlayer = (target->getType() == game::ObjectType::PLAYER);