From 8bcae7d98d72b21115b7807099f9772210d7cff2 Mon Sep 17 00:00:00 2001 From: p3lim Date: Mon, 13 Dec 2010 00:03:51 +0100 Subject: [PATCH] Make sure the item(s) are in a bag --- Molinari.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Molinari.lua b/Molinari.lua index 147b815..d9cf641 100644 --- a/Molinari.lua +++ b/Molinari.lua @@ -28,7 +28,7 @@ function button:PLAYER_LOGIN() local spell, r, g, b = ScanTooltip(self, spells) local bag, slot = GetMouseFocus():GetParent(), GetMouseFocus() - if(spell) then + if(spell and GetContainerItemLink(bag:GetID(), slot:GetID()) == link) then button:SetAttribute('macrotext', string.format('/cast %s\n/use %s %s', spell, slot:GetParent():GetID(), slot:GetID())) button:GetNormalTexture():SetVertexColor(r, g, b) button:SetAllPoints(slot) -- 1.7.9.5