From f283f9eb868d93d0d50d1343dae00cf67e8afaab Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 18 Mar 2026 11:30:34 -0700 Subject: [PATCH] fix: show equipment durability summary in repair button tooltip The Repair All button tooltip now shows how many items are damaged or broken instead of a generic message, helping players gauge repair need. --- src/ui/game_screen.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 3fc994d0..f9c3af10 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -15890,7 +15890,22 @@ void GameScreen::renderVendorWindow(game::GameHandler& gameHandler) { gameHandler.repairAll(vendor.vendorGuid, false); } if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Repair all equipped items using your gold"); + // Show durability summary of all equipment + const auto& inv = gameHandler.getInventory(); + int damagedCount = 0; + int brokenCount = 0; + for (int s = 0; s < static_cast(game::EquipSlot::BAG1); s++) { + const auto& slot = inv.getEquipSlot(static_cast(s)); + if (slot.empty() || slot.item.maxDurability == 0) continue; + if (slot.item.curDurability == 0) brokenCount++; + else if (slot.item.curDurability < slot.item.maxDurability) damagedCount++; + } + if (brokenCount > 0) + ImGui::SetTooltip("Repair all equipped items\n%d damaged, %d broken", damagedCount, brokenCount); + else if (damagedCount > 0) + ImGui::SetTooltip("Repair all equipped items\n%d item%s need repair", damagedCount, damagedCount > 1 ? "s" : ""); + else + ImGui::SetTooltip("All equipment is in good condition"); } if (gameHandler.isInGuild()) { ImGui::SameLine();