mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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.
This commit is contained in:
parent
3b79f44b54
commit
4edc4017ed
1 changed files with 22 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue