improved refresh after disenchanting an item
This commit is contained in:
@@ -151,7 +151,6 @@ local profSubList = {
|
|||||||
}
|
}
|
||||||
function PM:UNIT_SPELLCAST_SUCCEEDED(event, arg1, arg2)
|
function PM:UNIT_SPELLCAST_SUCCEEDED(event, arg1, arg2)
|
||||||
PM:RemoveItem(arg2)
|
PM:RemoveItem(arg2)
|
||||||
PM:UpdateItemFrame(arg2)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local cTip = CreateFrame("GameTooltip","cTooltip",nil,"GameTooltipTemplate")
|
local cTip = CreateFrame("GameTooltip","cTooltip",nil,"GameTooltipTemplate")
|
||||||
|
|||||||
@@ -45,21 +45,17 @@ local InventoryTypes = {
|
|||||||
function PM:InventoryFrame_Open(isEnabled)
|
function PM:InventoryFrame_Open(isEnabled)
|
||||||
if not isEnabled then return end
|
if not isEnabled then return end
|
||||||
if mainframe:IsVisible() then
|
if mainframe:IsVisible() then
|
||||||
|
PM:UnregisterEvent("BAG_UPDATE")
|
||||||
mainframe:Hide()
|
mainframe:Hide()
|
||||||
else
|
else
|
||||||
mainframe:Show()
|
mainframe:Show()
|
||||||
|
PM:RegisterEvent("BAG_UPDATE")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function PM:UpdateItemFrame(arg2)
|
|
||||||
if arg2 ~= "Disenchant" then return end
|
|
||||||
PM:RegisterEvent("BAG_UPDATE")
|
|
||||||
PM:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
|
|
||||||
end
|
|
||||||
|
|
||||||
function PM:BAG_UPDATE()
|
function PM:BAG_UPDATE()
|
||||||
PM:ScheduleTimer(function() PM:SearchBags() end, .10)
|
PM:ScheduleTimer(function() PM:SearchBags() end, .10)
|
||||||
PM:UnregisterEvent("BAG_UPDATE")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function filterCheck(quality, bagID, slotID)
|
local function filterCheck(quality, bagID, slotID)
|
||||||
|
|||||||
Reference in New Issue
Block a user