Added error checking for ERR_CANT_EQUIP_SKILL
James Whitehead II [09-08-08 - 20:17]
Added error checking for ERR_CANT_EQUIP_SKILL
diff --git a/DressToKill.lua b/DressToKill.lua
index 5284d3f..74582c4 100644
--- a/DressToKill.lua
+++ b/DressToKill.lua
@@ -365,6 +365,10 @@ local function OnEvent(self, event, arg1)
self.equipped = false
debug(L["Clearing item since we lack dual wielding skill"])
ClearCursor()
+ elseif event == "UI_ERROR_MESSAGE" and arg1 == ERR_CANT_EQUIP_SKILL then
+ self.equipped = false
+ debug(L["Clearing item since we lack the skill to equip it"])
+ ClearCursor()
elseif event == "UI_ERROR_MESSAGE" then
debug(L["Got an UI error message: %s"], arg1)
end