From a141e500e6185912d32e8b80a02eb81b494c8202 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Sun, 29 Apr 2012 10:36:39 -0400 Subject: [PATCH] -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. --- xanMortarPestle.lua | 9 +++++++-- xanMortarPestle.toc | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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 -- 1.7.9.5