Quantcast

-A small fix to allow the addon to be a bit more flexible with other addons.

Xruptor [04-29-12 - 14:36]
-A small fix to allow the addon to be a bit more flexible with other addons.
-The new fix should allow it to properly work with Elvui.
-A special thanks to pingumania at wowinterface.com for providing a quick fix.
Filename
xanMortarPestle.lua
xanMortarPestle.toc
diff --git a/xanMortarPestle.lua b/xanMortarPestle.lua
index 0410e5e..fa5b0df 100644
--- a/xanMortarPestle.lua
+++ b/xanMortarPestle.lua
@@ -48,7 +48,7 @@ button:RegisterEvent('MODIFIER_STATE_CHANGED')
 button:SetAttribute('alt-type1', 'macro')
 button:RegisterForClicks("LeftButtonUp")
 button:RegisterForDrag("LeftButton")
-button:SetFrameStrata("DIALOG")
+button:SetFrameStrata("TOOLTIP")

 --secured on leave function to hide the frame when we are in combat
 button:SetAttribute("_onleave", "self:ClearAllPoints() self:SetAlpha(0) self:Hide()")
@@ -238,7 +238,12 @@ UIErrorsFrame:SetScript("OnEvent", function(self, event, msg, r, g, b, ...)
 		--it's not a system message so lets grab it and compare with non-disenchant
 		if msg == SPELL_FAILED_CANT_BE_DISENCHANTED and XMP_DB and button:IsShown() and lastItem then
 			--get the id from the previously stored link
-			local id = type(lastItem) == "number" and lastItem or select(3, lastItem:find("item:(%d+):"))
+			local id
+			if type(lastItem) == "number" then
+				id = lastItem
+			else
+				id = select(3, lastItem:find("item:(%d+):"))
+			end
 			id = tonumber(id)
 			--check to see if it's already in the database, if it isn't then add it to the DE list.
 			if id and not XMP_DB[id] then
diff --git a/xanMortarPestle.toc b/xanMortarPestle.toc
index ac83629..8891574 100644
--- a/xanMortarPestle.toc
+++ b/xanMortarPestle.toc
@@ -2,7 +2,7 @@
 ## Title: xanMortarPestle
 ## Notes: Mill/Prospect/Disenchant using (Alt + Right-Click) on an item.
 ## Author: Xruptor
-## Version: 2.1
+## Version: 2.2
 ## SavedVariables: XMP_DB

 xanMortarPestle.lua