feat: parse and display item level and required level in tooltips

- Add itemLevel/requiredLevel fields to ItemQueryResponseData (parsed
  from SMSG_ITEM_QUERY_SINGLE_RESPONSE) and ItemDef
- Propagate through all 5 rebuildOnlineInventory() paths
- Show "Item Level N" and "Requires Level N" in item tooltip in
  standard WoW order (below item name, above required level/stats)
This commit is contained in:
Kelsi 2026-03-10 16:26:20 -07:00
parent 67db7383ad
commit 1793549550
5 changed files with 22 additions and 2 deletions

View file

@ -1714,6 +1714,9 @@ void InventoryScreen::renderItemTooltip(const game::ItemDef& item, const game::I
ImVec4 qColor = getQualityColor(item.quality);
ImGui::TextColored(qColor, "%s", item.name.c_str());
if (item.itemLevel > 0) {
ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.7f), "Item Level %u", item.itemLevel);
}
if (item.itemId == 6948 && gameHandler_) {
uint32_t mapId = 0;
@ -1819,6 +1822,9 @@ void InventoryScreen::renderItemTooltip(const game::ItemDef& item, const game::I
if (!bonusLine.empty()) {
ImGui::TextColored(green, "%s", bonusLine.c_str());
}
if (item.requiredLevel > 1) {
ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.5f, 1.0f), "Requires Level %u", item.requiredLevel);
}
if (item.maxDurability > 0) {
float durPct = static_cast<float>(item.curDurability) / static_cast<float>(item.maxDurability);
ImVec4 durColor;