Skip to content

Commit

Permalink
Show gems in character panel
Browse files Browse the repository at this point in the history
I.. I thought I had it added 😭
  • Loading branch information
ls- committed May 11, 2023
1 parent de469f7 commit 0fa529d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ls_UI/core/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ end

do
local ENCHANT_PATTERN = ENCHANTED_TOOLTIP_LINE:gsub("%%s", "(.+)")
local GEM_TEMPLATE = "|TInterface\\ItemSocketingFrame\\UI-EmptySocket-%s:0:0:0:0:64:64:4:60:4:60|t "
local SOCKET_TEMPLATE = "|TInterface\\ItemSocketingFrame\\UI-EmptySocket-%s:0:0:0:0:64:64:4:60:4:60|t "
local GEM_TEMPLATE = "|T%s:0:0:0:0:64:64:4:60:4:60|t "

local itemCache = {}

Expand All @@ -797,8 +798,8 @@ do
for _, line in next, data.lines do
if line.enchantID then
enchant = line.leftText:match(ENCHANT_PATTERN)
elseif line.socketType then
gems[idx] = GEM_TEMPLATE:format(line.socketType)
elseif line.gemIcon or line.socketType then
gems[idx] = line.gemIcon and GEM_TEMPLATE:format(line.gemIcon) or SOCKET_TEMPLATE:format(line.socketType)
idx = idx + 1
end
end
Expand Down

0 comments on commit 0fa529d

Please sign in to comment.