Mercurial > wow > wowdb-profiler
comparison Main.lua @ 377:c78fe36fea84
Replaced debug output boolean/nil replacements with a simple 'tostring'.
| author | MMOSimca <MMOSimca@gmail.com> |
|---|---|
| date | Wed, 26 Nov 2014 08:15:31 -0500 |
| parents | 4a4ed54e4201 |
| children | 8ca629ec7f57 |
comparison
equal
deleted
inserted
replaced
| 376:16c6db42fb7e | 377:c78fe36fea84 |
|---|---|
| 11 local table = _G.table | 11 local table = _G.table |
| 12 | 12 |
| 13 local next = _G.next | 13 local next = _G.next |
| 14 local select = _G.select | 14 local select = _G.select |
| 15 local unpack = _G.unpack | 15 local unpack = _G.unpack |
| 16 | |
| 17 local LOOT_SLOT_CURRENCY, LOOT_SLOT_ITEM, LOOT_SLOT_MONEY = _G.LOOT_SLOT_CURRENCY, _G.LOOT_SLOT_ITEM, _G.LOOT_SLOT_MONEY | |
| 18 | 16 |
| 19 | 17 |
| 20 -- ADDON NAMESPACE ---------------------------------------------------- | 18 -- ADDON NAMESPACE ---------------------------------------------------- |
| 21 | 19 |
| 22 local ADDON_NAME, private = ... | 20 local ADDON_NAME, private = ... |
| 47 local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) | 45 local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) |
| 48 local PLAYER_FACTION = _G.UnitFactionGroup("player") | 46 local PLAYER_FACTION = _G.UnitFactionGroup("player") |
| 49 local PLAYER_GUID | 47 local PLAYER_GUID |
| 50 local PLAYER_NAME = _G.UnitName("player") | 48 local PLAYER_NAME = _G.UnitName("player") |
| 51 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) | 49 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) |
| 50 | |
| 51 local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY | |
| 52 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM | |
| 53 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY | |
| 52 | 54 |
| 53 local TIMBER_ITEM_ID = 114781 | 55 local TIMBER_ITEM_ID = 114781 |
| 54 | 56 |
| 55 -- Ignoring NPC casts of the following spells | 57 -- Ignoring NPC casts of the following spells |
| 56 local CHI_WAVE_SPELL_ID = 132464 | 58 local CHI_WAVE_SPELL_ID = 132464 |
| 199 | 201 |
| 200 if ... then | 202 if ... then |
| 201 local args = { ... } | 203 local args = { ... } |
| 202 | 204 |
| 203 for index = 1, #args do | 205 for index = 1, #args do |
| 204 if args[index] == nil then | 206 args[index] = tostring(args[index]) |
| 205 args[index] = "nil" | |
| 206 elseif args[index] == true then | |
| 207 args[index] = "true" | |
| 208 elseif args[index] == false then | |
| 209 args[index] = "false" | |
| 210 end | |
| 211 end | 207 end |
| 212 _G.print(message:format(unpack(args))) | 208 _G.print(message:format(unpack(args))) |
| 213 else | 209 else |
| 214 _G.print(message) | 210 _G.print(message) |
| 215 end | 211 end |
