annotate Modules/Utils.lua @ 4:c940b527ccab

Fixed Milling. Disenchating will probably have to be fixed the same way
author Asa Ayers <Asa.Ayers@Gmail.com>
date Sat, 22 May 2010 15:23:11 -0700
parents bbcf81868171
children 5dddd73b2220
rev   line source
Asa@3 1 local addonName, addonTable = ...;
Asa@3 2 local addon = {}
Asa@3 3
Asa@3 4 local AceConsole = LibStub("AceConsole-3.0")
Asa@3 5 AceConsole:Embed(addon)
Asa@3 6
Asa@3 7 addonTable.utils = addon
Asa@3 8
Asa@3 9 function addon:FormatMoney(money)
Asa@3 10 return Altoholic:GetMoneyString(money, WHITE, false)
Asa@3 11 end
Asa@3 12
Asa@3 13 function addon:tcount(tab)
Asa@3 14 local n = #tab
Asa@3 15 if (n == 0) then
Asa@3 16 for _ in pairs(tab) do
Asa@3 17 n = n + 1
Asa@3 18 end
Asa@3 19 end
Asa@3 20 return n
Asa@3 21 end
Asa@3 22
Asa@3 23
Asa@3 24 function addon:GetDebug(info)
Asa@3 25 return true
Asa@3 26 -- return self.db.char.debug
Asa@3 27 end
Asa@3 28
Asa@3 29 function addon:SetDebug(info, input)
Asa@3 30 self:Print("Debugging is now: " .. value)
Asa@3 31 self.db.char.debug = input
Asa@3 32 local value = "off"
Asa@3 33 if input then
Asa@3 34 value = "on"
Asa@3 35 end
Asa@3 36
Asa@3 37 end