Fixed a rather nasty bug that would prevent you from equipping any boe items
James Whitehead II [08-23-08 - 07:37]
Fixed a rather nasty bug that would prevent you from equipping any boe items
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