From 8981017af76714640c57e0ef6f738fe5ef03b124 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 28 Nov 2009 21:49:32 +0100 Subject: [PATCH] Avoid clicking when Auction, Trade, Bank or Mail frame is shown --- Molinari.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Molinari.lua b/Molinari.lua index 9f056f8..fb0d725 100644 --- a/Molinari.lua +++ b/Molinari.lua @@ -49,9 +49,13 @@ local function ScanTooltip() end end +local function Clickable() + return (not IsAddOnLoaded('Blizzard_AuctionUI') or (AuctionFrame and not AuctionFrame:IsShown())) and not TradeFrame:IsShown() and not BankFrame:IsShown() and not MailFrame:IsShown() and not InCombatLockdown() and IsAltKeyDown() +end + GameTooltip:HookScript('OnTooltipSetItem', function(self) local item = self:GetItem() - if(item and IsAltKeyDown() and not InCombatLockdown()) then + if(item and Clickable) then local spell, r, g, b = ScanTooltip() if(not spell) then spell, r, g, b = Disenchantable(item) -- 1.7.9.5