From 120ee634cf84c4c4c82b0151bb0ada613ce8451e Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Mon, 21 Dec 2009 08:30:31 -0600 Subject: [PATCH] Added markings to tooltips for unweighted/unparsed effects --- WeightsWatcher.lua | 65 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua index 54679f4..352f980 100644 --- a/WeightsWatcher.lua +++ b/WeightsWatcher.lua @@ -706,30 +706,57 @@ function WeightsWatcher.displayItemStats(tooltip, ttname) end end end - if not ww_vars.options.tooltip.hideHints and #(sockets) > 0 then - if not showIdealWeights then - if ww_vars.options.tooltip.showIdealWeights ~= "Never" then - tooltip:AddLine("") - end - elseif not showIdealGems then - if ww_vars.options.tooltip.showIdealGems ~= "Never" then - tooltip:AddLine("") - end - else - if not showIdealGemStats then - if ww_vars.options.tooltip.showIdealGemStats ~= "Never" then - tooltip:AddLine("") + end + + local start, ttleft, origTextL, textL + local numUnweightedEffects = 0 + -- Skip item name and "currently equipped" + if WeightsWatcherHiddenTooltipTextLeft1:GetText() == CURRENTLY_EQUIPPED then + start = 3 + else + start = 2 + end + + for i = start, tooltip:NumLines() do + ttleft = getglobal(ttname .. "TextLeft" .. i) + origTextL = ttleft:GetText() + textL = WeightsWatcher.preprocess(origTextL:lower()) + if rawget(ww_unparsed_lines, textL) or rawget(ww_unweighted_lines, textL) then + ttleft:SetText(origTextL .. " |cffff0000*|r") + numUnweightedEffects = numUnweightedEffects + 1 + end + end + if numUnweightedEffects > 0 then + tooltip:AddLine("|cffff0000* indicates unweighted effects|r (" .. numUnweightedEffects .. " total)") + end + + if not ww_vars.options.tooltip.hideHints then + if showWeights then + if not ww_vars.options.tooltip.hideHints and #(sockets) > 0 then + if not showIdealWeights then + if ww_vars.options.tooltip.showIdealWeights ~= "Never" then + tooltip:AddLine("") end - end - if not showAlternateGems and alternateGemsExist then - if ww_vars.options.tooltip.showAlternateGems ~= "Never" then - tooltip:AddLine("") + elseif not showIdealGems then + if ww_vars.options.tooltip.showIdealGems ~= "Never" then + tooltip:AddLine("") + end + else + if not showIdealGemStats then + if ww_vars.options.tooltip.showIdealGemStats ~= "Never" then + tooltip:AddLine("") + end + end + if not showAlternateGems and alternateGemsExist then + if ww_vars.options.tooltip.showAlternateGems ~= "Never" then + tooltip:AddLine("") + end end end end + elseif ww_vars.options.tooltip.showWeights ~= "Never" then + tooltip:AddLine("") end - elseif not ww_vars.options.tooltip.hideHints and ww_vars.options.tooltip.showWeights ~= "Never" then - tooltip:AddLine("") end tooltip:Show() -- 1.7.9.5