WoWInterface SVN DressToKill

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 23 to Rev 24
    Reverse comparison

Rev 23 → Rev 24

DressToKill.lua
347,28 → 347,28
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