Mercurial > wow > itemauditor
diff Modules/Utils.lua @ 3:bbcf81868171
Code cleanup.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Sat, 22 May 2010 11:34:19 -0700 |
parents | |
children | 5dddd73b2220 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Modules/Utils.lua Sat May 22 11:34:19 2010 -0700 @@ -0,0 +1,37 @@ +local addonName, addonTable = ...; +local addon = {} + +local AceConsole = LibStub("AceConsole-3.0") +AceConsole:Embed(addon) + +addonTable.utils = addon + +function addon:FormatMoney(money) + return Altoholic:GetMoneyString(money, WHITE, false) +end + +function addon:tcount(tab) + local n = #tab + if (n == 0) then + for _ in pairs(tab) do + n = n + 1 + end + end + return n +end + + +function addon:GetDebug(info) + return true + -- return self.db.char.debug +end + +function addon:SetDebug(info, input) + self:Print("Debugging is now: " .. value) + self.db.char.debug = input + local value = "off" + if input then + value = "on" + end + +end