Added DressToKill:SetDebug(value) which will enable/disable debug message depending on what you pass it. This works for one session only.
James Whitehead II [08-15-08 - 18:16]
Added DressToKill:SetDebug(value) which will enable/disable debug message depending on what you pass it. This works for one session only.
diff --git a/DressToKill.lua b/DressToKill.lua
index bfa7cb3..e4463ac 100644
--- a/DressToKill.lua
+++ b/DressToKill.lua
@@ -17,6 +17,10 @@ local function debug(fmt, ...)
end
end
+function DressToKill:SetDebug(value)
+ DEBUG = value
+end
+
local function print(fmt, ...)
local msg = "|cffffff78DressToKill:|r "
if select("#", ...) > 0 then
@@ -131,6 +135,7 @@ local function scanFunction(weightFunction)
if equipped then
local link = GetInventoryItemLink("player", slotId)
local score = weightFunction(link, slotId)
+ debug("Got score of %s for %s", score, link)
if score >= maxScore then
maxScore = score
winner = mask