From 34349e7864312d32ff2d10bbd972ce5598eeb33b Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sat, 23 Aug 2008 07:37:30 +0000 Subject: [PATCH] Fixed a rather nasty bug that would prevent you from equipping any boe items --- DressToKill.lua | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/DressToKill.lua b/DressToKill.lua index e468cd9..5284d3f 100644 --- a/DressToKill.lua +++ b/DressToKill.lua @@ -347,28 +347,28 @@ eventFrame:RegisterEvent("UNIT_INVENTORY_CHANGED") eventFrame:RegisterEvent("EQUIP_BIND_CONFIRM") eventFrame:RegisterEvent("UI_ERROR_MESSAGE") +--local LEVEL_LOW = LEVEL_TOO_LOW:gsub("%%d", "%%d%+"):gsub("%.", "%%.") + local function OnEvent(self, event, arg1) self.equipped = true - if event == "EQUIP_BIND_CONFIRM" and CursorHasItem() then - self.equipped = false - debug(L["Clearing non-soulbound item"]) - ClearCursor() - elseif event == "UI_ERROR_MESSAGE" and arg1 == ERR_PROFICIENCY_NEEDED then - self.equipped = false - debug(L["Clearing item we don't have the proficiency for"]) - ClearCursor() - elseif event == "UI_ERROR_MESSAGE" and arg1 == ERR_2HSKILLNOTFOUND then - self.equipped = false - debug(L["Clearing item since we lack dual wielding skill"]) - ClearCursor() - elseif event == "UI_ERROR_MESSAGE" and arg1 == LEVEL_TOO_LOW then - self.equipped = false - debug(L["Clearing item that we're too low to equip"]) - ClearCursor() - end - local thread = DressToKill.currentThread if thread and coroutine.status(thread) ~= "dead" then + if event == "EQUIP_BIND_CONFIRM" and CursorHasItem() then + self.equipped = false + debug(L["Clearing non-soulbound item"]) + ClearCursor() + elseif event == "UI_ERROR_MESSAGE" and arg1 == ERR_PROFICIENCY_NEEDED then + self.equipped = false + debug(L["Clearing item we don't have the proficiency for"]) + ClearCursor() + elseif event == "UI_ERROR_MESSAGE" and arg1 == ERR_2HSKILLNOTFOUND then + self.equipped = false + debug(L["Clearing item since we lack dual wielding skill"]) + ClearCursor() + elseif event == "UI_ERROR_MESSAGE" then + debug(L["Got an UI error message: %s"], arg1) + end + self:Show() end end -- 1.7.9.5