From 9b8a37b17cec5204ebe144553898a6556ffc605c Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 2 Jan 2010 13:25:06 +0100 Subject: [PATCH] Simplify the click arguments --- Molinari.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Molinari.lua b/Molinari.lua index cc403b8..9849ead 100644 --- a/Molinari.lua +++ b/Molinari.lua @@ -52,19 +52,19 @@ local function ScanTooltip() end end -local function Clickable(spell) - return (not IsAddOnLoaded('Blizzard_AuctionUI') or (AuctionFrame and not AuctionFrame:IsShown())) and not (spell == disenchanting and CharacterFrame:IsShown()) and not InCombatLockdown() and IsAltKeyDown() +local function Clickable() + return not InCombatLockdown() and IsAltKeyDown() end GameTooltip:HookScript('OnTooltipSetItem', function(self) local item = self:GetItem() - if(item) then + if(item and Clickable()) then local spell, r, g, b = ScanTooltip() if(not spell) then spell, r, g, b = Disenchantable(item) end - if(spell and Clickable(spell)) then + if(spell) then local slot = GetMouseFocus() button:SetAttribute('macrotext', macro:format(spell, slot:GetParent():GetID(), slot:GetID())) button:SetAllPoints(slot) -- 1.7.9.5