From be62a224ea42dfc550a2b892d8c613c94b8e6c33 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 15 Jun 2018 20:45:42 +0200 Subject: [PATCH] unusable: fix and trigger make-usable function --- modules/unusable.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/unusable.lua b/modules/unusable.lua index 27f1a9f5..86394eec 100644 --- a/modules/unusable.lua +++ b/modules/unusable.lua @@ -2,7 +2,6 @@ pfUI:RegisterModule("unusable", function () pfUI.unusable = CreateFrame("Frame", "pfUnusable", UIParent) pfUI.unusable.tooltip = CreateFrame("GameTooltip", "pfUnusableTooltip", UIParent, "GameTooltipTemplate") - pfUI.unusable:UnregisterAllEvents() pfUI.unusable:RegisterEvent("MAIL_INBOX_UPDATE") pfUI.unusable:RegisterEvent("PLAYER_LEVEL_UP") pfUI.unusable:RegisterEvent("SKILL_LINES_CHANGED") @@ -37,6 +36,8 @@ pfUI:RegisterModule("unusable", function () function pfUI.unusable:UpdateSlot(frame, bag, slot) if not pfUI.unusable:IsSlotItemUsable(frame, bag, slot) then pfUI.unusable:MakeUnusable(frame) + else + pfUI.unusable:MakeUsable(frame) end end @@ -156,7 +157,7 @@ pfUI:RegisterModule("unusable", function () SetDesaturation(frame, nil) else if slot.oldVertexFunc then - _G[frame:GetName().."IconTexture"] = slot.oldVertexFunc + _G[frame:GetName().."IconTexture"].SetVertexColor = slot.oldVertexFunc slot.oldVertexFunc = nil end