Avoid clicking when Auction, Trade, Bank or Mail frame is shown
unknown [11-28-09 - 20:49]
Avoid clicking when Auction, Trade, Bank or Mail frame is shown
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)