feat: show Unique-Equipped on items with that flag

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).
This commit is contained in:
Kelsi 2026-03-23 01:32:37 -07:00
parent 757fc857cd
commit d0743c5fee

View file

@ -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"