Fix another 11.0.2 error

Fixes #10
This commit is contained in:
2024-08-14 16:18:29 -05:00
parent 89191ad299
commit d24498372b
2 changed files with 15 additions and 5 deletions

View File

@ -1513,9 +1513,11 @@ function Breakables:FindBreakablesInSlot(bagId, slotId)
local tooltipData local tooltipData
if C_TooltipInfo then if C_TooltipInfo then
tooltipData = C_TooltipInfo.GetBagItem(bagId, slotId) tooltipData = C_TooltipInfo.GetBagItem(bagId, slotId)
TooltipUtil.SurfaceArgs(tooltipData) if TooltipUtil and TooltipUtil.SurfaceArgs then
for _, line in ipairs(tooltipData.lines) do TooltipUtil.SurfaceArgs(tooltipData)
TooltipUtil.SurfaceArgs(line) for _, line in ipairs(tooltipData.lines) do
TooltipUtil.SurfaceArgs(line)
end
end end
else else
self.myTooltip:SetBagItem(bagId, slotId) self.myTooltip:SetBagItem(bagId, slotId)
@ -1616,9 +1618,13 @@ function Breakables:PlayerHasSkillToPickItem(bagId, slotId)
return true return true
end end
TooltipUtil.SurfaceArgs(tooltipData) if TooltipUtil and TooltipUtil.SurfaceArgs then
TooltipUtil.SurfaceArgs(tooltipData)
end
for _, line in ipairs(tooltipData.lines) do for _, line in ipairs(tooltipData.lines) do
TooltipUtil.SurfaceArgs(line) if TooltipUtil and TooltipUtil.SurfaceArgs then
TooltipUtil.SurfaceArgs(line)
end
if line.leftText == LOCKED then 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) return not (line.leftColor and line.leftColor.r == 1 and line.leftColor.g < 0.2 and line.leftColor.b < 0.2)
end end

View File

@ -1,3 +1,7 @@
v1.10.3:
- Fix another error from 11.0.2
v1.10.2: v1.10.2:
- Fix error from 11.0.2 - Fix error from 11.0.2