view Modules/Utils.lua @ 5:7d0f4ebedf8c

work in progress: I added Prospecting and Disenchanting and AHOutbid mail and I also changed the initialization to quit forcing debug every time ItemAuditor loads and have begun to implement the COD mail scanning.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Wed, 26 May 2010 21:26:24 -0700
parents bbcf81868171
children 5dddd73b2220
line wrap: on
line source
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