From 4edc4017edceb03844dfca223e35456a4d51e208 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 17 Mar 2026 14:50:28 -0700 Subject: [PATCH] feat: show extra stats in equipped item comparison panel (shift-hover) When shift-hovering an item link in chat to compare with equipped gear, also display extra stats (hit/crit/haste/AP/SP/expertise) for the currently-equipped item, matching what is shown for the hovered item. --- src/ui/game_screen.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 97cac5c2..bcd920ef 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -1580,6 +1580,28 @@ void GameScreen::renderChatWindow(game::GameHandler& gameHandler) { if (!eqBonusLine.empty()) { ImGui::TextColored(green, "%s", eqBonusLine.c_str()); } + // Extra stats for the equipped item + for (const auto& es : eq->item.extraStats) { + const char* nm = nullptr; + switch (es.statType) { + case 12: nm = "Defense Rating"; break; + case 13: nm = "Dodge Rating"; break; + case 14: nm = "Parry Rating"; break; + case 16: case 17: case 18: case 31: nm = "Hit Rating"; break; + case 19: case 20: case 21: case 32: nm = "Critical Strike Rating"; break; + case 28: case 29: case 30: case 35: nm = "Haste Rating"; break; + case 34: nm = "Resilience Rating"; break; + case 36: nm = "Expertise Rating"; break; + case 37: nm = "Attack Power"; break; + case 38: nm = "Ranged Attack Power"; break; + case 45: nm = "Spell Power"; break; + case 46: nm = "Healing Power"; break; + case 49: nm = "Mana per 5 sec."; break; + default: break; + } + if (nm && es.statValue > 0) + ImGui::TextColored(green, "+%d %s", es.statValue, nm); + } } } ImGui::EndTooltip();