From a24f0e0b919de96be25e4cdc62c4861419a33c19 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 21 Jul 2012 14:29:53 +0200 Subject: [PATCH] Properly bail if there is no action --- Molinari.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Molinari.lua b/Molinari.lua index e59e876..dca99af 100644 --- a/Molinari.lua +++ b/Molinari.lua @@ -37,14 +37,16 @@ function button:PLAYER_LOGIN() if(item and not InCombatLockdown() and IsAltKeyDown() and not (AuctionFrame and AuctionFrame:IsShown())) then local spell, r, g, b = ScanTooltip(self, spells) + if(not spell and disenchanter and ns.Disenchantable(link)) then + spell, r, g, b = GetSpellInfo(13262), 1/2, 1/2, 1 + end + + if(not spell and rogue and ns.Openable) then + spell, r, g, b = GetSpellInfo(1804), 0, 1, 1 + end + if(not spell) then - if(disenchanter and ns.Disenchantable(link)) then - spell, r, g, b = GetSpellInfo(13262), 1/2, 1/2, 1 - elseif(rogue and ns.Openable) then - spell, r, g, b = GetSpellInfo(1804), 0, 1, 1 - else - return - end + return end local bag, slot = GetMouseFocus():GetParent(), GetMouseFocus() -- 1.7.9.5