Fallback to TextLeft and TextRight tooltip lines

This commit is contained in:
Flamanis
2024-07-18 10:56:35 -05:00
committed by andrew6180
parent 161481c821
commit e33102567b
+16 -2
View File
@@ -1324,8 +1324,8 @@ do
for i = 1, #allTooltips do
local tooltipName = allTooltips[i]
local tooltip = _G[tooltipName]
if (tooltip and tooltip.GetTooltipData and tooltip:IsVisible()) then
if (tooltip and tooltip:IsVisible()) then
if (tooltip.GetTooltipData) then
local tooltipData = tooltip:GetTooltipData()
if (tooltipData) then
if (tooltip.ItemTooltip and tooltip.ItemTooltip:IsVisible()) then
@@ -1368,6 +1368,20 @@ do
end
return Details:Dump(tooltipData)
end
else
local outputTable = {}
for lineNumber = 1, 10 do
local leftText = _G[tooltipName..'TextLeft'..lineNumber]
local rightText = _G[tooltipName..'TextRight'..lineNumber]
if not (leftText and rightText) then
break
end
outputTable[#outputTable+1] = {left = leftText:GetText(), right = rightText:GetText()}
end
return Details:Dump(outputTable)
end
end
end