/trunk
local function debug(fmt, ...) |
local msg = "|cffffff78DressToKill:|r " |
if select("#", ...) > 0 then |
msg = msg .. fmt:format(...) |
local succ,err = pcall(string.format, fmt, ...) |
if not succ then |
error(debugstack()) |
else |
msg = msg .. err |
end |
else |
msg = msg .. fmt |
end |
debug(L["Successfully equipped %s"], link) |
local mh_link = GetInventoryItemLink("player", mainslot) |
local mh_score = weightFunction(mh_link, mainslot) - mh_base |
debug(L["Mainhand score: %d"], score) |
debug(L["Mainhand score: %d"], mh_score) |
if not IsEquippedItemType("Two-Hand") then |
debug(L["This is a one hand weapon, try offhand weapons"]) |