mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
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.
This commit is contained in:
parent
1b075e17f1
commit
7967878cd9
1 changed files with 5 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue