comparison Main.lua @ 342:2bd9de08833f WoD

'DEBUGGING' is now 'WOWDB_DEBUGGING' and is also a global, for easier testing/distribution.
author MMOSimca <MMOSimca@gmail.com>
date Wed, 24 Sep 2014 23:14:03 -0400
parents d708222fe96b
children 2149753132a1
comparison
equal deleted inserted replaced
341:f6383e961e46 342:2bd9de08833f
33 -- CONSTANTS ---------------------------------------------------------- 33 -- CONSTANTS ----------------------------------------------------------
34 34
35 local AF = private.ACTION_TYPE_FLAGS 35 local AF = private.ACTION_TYPE_FLAGS
36 local CLIENT_LOCALE = _G.GetLocale() 36 local CLIENT_LOCALE = _G.GetLocale()
37 local DB_VERSION = 18 37 local DB_VERSION = 18
38 local DEBUGGING = false 38 WOWDB_DEBUGGING = false
39 local EVENT_DEBUG = false 39 local EVENT_DEBUG = false
40 40
41 local OBJECT_ID_ANVIL = 192628 41 local OBJECT_ID_ANVIL = 192628
42 local OBJECT_ID_FISHING_BOBBER = 35591 42 local OBJECT_ID_FISHING_BOBBER = 35591
43 local OBJECT_ID_FORGE = 1685 43 local OBJECT_ID_FORGE = 1685
179 179
180 180
181 -- HELPERS ------------------------------------------------------------ 181 -- HELPERS ------------------------------------------------------------
182 182
183 local function Debug(message, ...) 183 local function Debug(message, ...)
184 if not DEBUGGING or not message or not ... then 184 if not WOWDB_DEBUGGING or not message or not ... then
185 return 185 return
186 end 186 end
187 local args = { ... } 187 local args = { ... }
188 188
189 for index = 1, #args do 189 for index = 1, #args do
882 882
883 883
884 function WDP:EventDispatcher(...) 884 function WDP:EventDispatcher(...)
885 local event_name = ... 885 local event_name = ...
886 886
887 if DEBUGGING then 887 if WOWDB_DEBUGGING then
888 if event_name == "COMBAT_LOG_EVENT_UNFILTERED" then 888 if event_name == "COMBAT_LOG_EVENT_UNFILTERED" then
889 Debug(event_name) 889 Debug(event_name)
890 else 890 else
891 Debug(...) 891 Debug(...)
892 end 892 end
2181 end 2181 end
2182 2182
2183 2183
2184 function WDP:PET_JOURNAL_LIST_UPDATE(event_name) 2184 function WDP:PET_JOURNAL_LIST_UPDATE(event_name)
2185 -- This function produces data currently unused by wowdb.com and it makes debugging errors in the .lua output nearly impossible due to the massive bloat. 2185 -- This function produces data currently unused by wowdb.com and it makes debugging errors in the .lua output nearly impossible due to the massive bloat.
2186 if DEBUGGING then 2186 if WOWDB_DEBUGGING then
2187 return 2187 return
2188 end 2188 end
2189 2189
2190 local num_pets = LPJ:NumPets() 2190 local num_pets = LPJ:NumPets()
2191 2191