From d0743c5feee6e0ea684f36c0ee225f4ae323d1b5 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 23 Mar 2026 01:32:37 -0700 Subject: [PATCH] feat: show Unique-Equipped on items with that flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Items with the Unique-Equipped flag (itemFlags & 0x1000000) now display "Unique-Equipped" in the tooltip header. This is distinct from "Unique" (maxCount=1) — Unique-Equipped means you can carry multiple but only equip one (e.g., trinkets, rings with the flag). --- src/addons/lua_engine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/addons/lua_engine.cpp b/src/addons/lua_engine.cpp index 0eba700a..771baf38 100644 --- a/src/addons/lua_engine.cpp +++ b/src/addons/lua_engine.cpp @@ -2161,6 +2161,7 @@ static int lua_GetItemTooltipData(lua_State* 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"); } + if (info->itemFlags & 0x1000000) { lua_pushboolean(L, 1); lua_setfield(L, -2, "isUniqueEquipped"); } // Bind type lua_pushnumber(L, info->bindType); lua_setfield(L, -2, "bindType"); @@ -6208,7 +6209,8 @@ void LuaEngine::registerCoreAPI() { " 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.isUnique then self:AddLine('Unique', 1, 1, 1)\n" + " elseif data.isUniqueEquipped then self:AddLine('Unique-Equipped', 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"