Skip to content

Commit 89d3cc5

Browse files
authored
feat: add gem color indicators to socket group labels (#9710)
1 parent 15a40d1 commit 89d3cc5

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/Classes/SkillListControl.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,27 @@ function SkillListClass:GetRowValue(column, index, socketGroup)
8484
if socketGroup.includeInFullDPS then
8585
label = label .. colorCodes.CUSTOM .. " (FullDPS)"
8686
end
87+
88+
if not socketGroup.source then
89+
local colorStr = ""
90+
for _, gem in ipairs(socketGroup.gemList) do
91+
if gem.gemData or gem.grantedEffect then
92+
local grantedEffect = gem.grantedEffect or (gem.gemData and gem.gemData.grantedEffect)
93+
if grantedEffect then
94+
local char = grantedEffect.color == 1 and "R" or grantedEffect.color == 2 and "G" or grantedEffect.color == 3 and "B" or "W"
95+
local colorCode = gem.color or ""
96+
if colorStr:len() > 0 then
97+
colorStr = colorStr .. "^7-"
98+
end
99+
colorStr = colorStr .. colorCode .. char
100+
end
101+
end
102+
end
103+
if colorStr:len() > 0 then
104+
label = label .. " ^7" .. colorStr
105+
end
106+
end
107+
87108
return label
88109
end
89110
end

0 commit comments

Comments
 (0)