Mercurial > wow > wowdb-profiler
comparison Main.lua @ 374:73fd6e568211
Debug output now replaces boolean expressions with their string counterparts, avoiding potential errors.
| author | MMOSimca <MMOSimca@gmail.com> |
|---|---|
| date | Sat, 22 Nov 2014 11:13:32 -0500 |
| parents | b372179ddaac |
| children | 4a4ed54e4201 |
comparison
equal
deleted
inserted
replaced
| 373:b372179ddaac | 374:73fd6e568211 |
|---|---|
| 201 local args = { ... } | 201 local args = { ... } |
| 202 | 202 |
| 203 for index = 1, #args do | 203 for index = 1, #args do |
| 204 if args[index] == nil then | 204 if args[index] == nil then |
| 205 args[index] = "nil" | 205 args[index] = "nil" |
| 206 elseif args[index] == true then | |
| 207 args[index] = "true" | |
| 208 elseif args[index] == false then | |
| 209 args[index] = "false" | |
| 206 end | 210 end |
| 207 end | 211 end |
| 208 _G.print(message:format(unpack(args))) | 212 _G.print(message:format(unpack(args))) |
| 209 else | 213 else |
| 210 _G.print(message) | 214 _G.print(message) |
| 1291 end | 1295 end |
| 1292 local container_id = private.loot_toast_container_id | 1296 local container_id = private.loot_toast_container_id |
| 1293 local npc_id = private.raid_boss_id | 1297 local npc_id = private.raid_boss_id |
| 1294 | 1298 |
| 1295 -- Need information on the most recent args, so using this complete debug statement for now | 1299 -- Need information on the most recent args, so using this complete debug statement for now |
| 1296 Debug("%s: loot_type: %s, item_link: %s, quantity: %s, spec_ID: %s, is_personal: %s, loot_source: %s", event_name, loot_type, item_link, quantity, spec_ID, (is_personal and "true") or "false", loot_source) | 1300 Debug("%s: loot_type: %s, item_link: %s, quantity: %s, spec_ID: %s, is_personal: %s, loot_source: %s", event_name, loot_type, item_link, quantity, spec_ID, is_personal, loot_source) |
| 1297 | 1301 |
| 1298 -- Handle Garrison cache specially | 1302 -- Handle Garrison cache specially |
| 1299 if lootSource and last_garrison_cache_object_id and (lootSource == private.GARRISON_CACHE_LOOT_SOURCE_ID) then | 1303 if lootSource and last_garrison_cache_object_id and (lootSource == private.GARRISON_CACHE_LOOT_SOURCE_ID) then |
| 1300 -- Record location data for cache | 1304 -- Record location data for cache |
| 1301 UpdateDBEntryLocation("objects", ("OPENING:%d"):format(last_garrison_cache_object_id)) | 1305 UpdateDBEntryLocation("objects", ("OPENING:%d"):format(last_garrison_cache_object_id)) |
