From 491ad4c79a29deee683517ca4796ac7fe87b04a7 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Wed, 10 Feb 2010 20:21:43 -0600 Subject: [PATCH] Fixed alternate gems tooltip hint (used to show all the time) --- WeightsWatcher.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua index 0cbd736..36d408b 100644 --- a/WeightsWatcher.lua +++ b/WeightsWatcher.lua @@ -453,6 +453,7 @@ function WeightsWatcher:displayItemStats(tooltip, ttname) local stat, value, str, formatStr local compareLink, compareBareLink, compareLink2, compareBareLink2, compareMethod local showWeights, showIdealWeights, showIdealGems, showIdealGemStats, showAlternateGems + local alternateGemsExist = false local _, playerClass = UnitClass("player") _, link = tooltip:GetItem() @@ -539,6 +540,7 @@ function WeightsWatcher:displayItemStats(tooltip, ttname) for i, gem in ipairs(gems) do if #(gems) > 1 then tooltip:AddDoubleLine(" (Option " .. i .. "/" .. #(gems) .. ") " .. gem[2] .. " (" .. gem[1] .. ")", " ") + alternateGemsExist = true else tooltip:AddDoubleLine(" Using " .. gem[2] .. " (" .. gem[1] .. ")", " ") end @@ -573,7 +575,7 @@ function WeightsWatcher:displayItemStats(tooltip, ttname) tooltip:AddLine("") end end - if not showAlternateGems then + if not showAlternateGems and alternateGemsExist then if ww_vars.options.tooltip.showAlternateGems ~= "Never" then tooltip:AddLine("") end -- 1.7.9.5