Fix lockbox skill level detection

This commit is contained in:
2022-11-30 08:15:57 -06:00
parent cd34b60c36
commit b08c8c49d2

View File

@ -1514,16 +1514,10 @@ function Breakables:PlayerHasSkillToPickItem(bagId, slotId)
end
TooltipUtil.SurfaceArgs(tooltipData)
local inspectNextLine = false
for _, line in ipairs(tooltipData.lines) do
TooltipUtil.SurfaceArgs(line)
if inspectNextLine then
inspectNextLine = false
if line.leftColor and line.leftColor.r == 1 then
return false
end
elseif line.leftText == LOCKED then
inspectNextLine = true
if line.leftText == LOCKED then
return not (line.leftColor and line.leftColor.r == 1 and line.leftColor.g < 0.2 and line.leftColor.b < 0.2)
end
end