From 7967878cd9fd39b6cf8299af392233e1d688067e Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 22 Mar 2026 20:25:41 -0700 Subject: [PATCH] feat: show Unique and Heroic tags on item tooltips Items with maxCount=1 now show "Unique" in white text below the name. Items with the Heroic flag (0x8) show "Heroic" in green text. Both display before the bind type line, matching WoW's tooltip order. Heroic items (from heroic dungeon/raid drops) are visually distinguished from their normal-mode counterparts. Unique items (trinkets, quest items, etc.) show the carry limit clearly. --- src/addons/lua_engine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/addons/lua_engine.cpp b/src/addons/lua_engine.cpp index c7c754bf..c595085b 100644 --- a/src/addons/lua_engine.cpp +++ b/src/addons/lua_engine.cpp @@ -2054,6 +2054,9 @@ static int lua_GetItemTooltipData(lua_State* L) { if (!info) { lua_pushnil(L); return 1; } lua_newtable(L); + // Unique / Heroic flags + if (info->maxCount == 1) { lua_pushboolean(L, 1); lua_setfield(L, -2, "isUnique"); } + if (info->itemFlags & 0x8) { lua_pushboolean(L, 1); lua_setfield(L, -2, "isHeroic"); } // Bind type lua_pushnumber(L, info->bindType); lua_setfield(L, -2, "bindType"); @@ -5508,6 +5511,8 @@ void LuaEngine::registerCoreAPI() { " local data = _GetItemTooltipData(itemId)\n" " if data then\n" " -- Bind type\n" + " if data.isHeroic then self:AddLine('Heroic', 0, 1, 0) end\n" + " if data.isUnique then self:AddLine('Unique', 1, 1, 1) end\n" " if data.bindType == 1 then self:AddLine('Binds when picked up', 1, 1, 1)\n" " elseif data.bindType == 2 then self:AddLine('Binds when equipped', 1, 1, 1)\n" " elseif data.bindType == 3 then self:AddLine('Binds when used', 1, 1, 1) end\n"