Mercurial > wow > itemauditor
annotate Modules/Debug.lua @ 13:8c83d5f6e306
OPTIONS! QuickAuctions is now an optional dependency. I have also added some configuration options for it. If you have QA but don't want IA to update your thresholds you can shut off the integration. I have also added other options so you can select your faction or the neutral AH and it will update the tooltip.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Fri, 02 Jul 2010 21:39:24 -0700 |
parents | bbba2fae0f69 |
children | 56de19d9bd8d |
rev | line source |
---|---|
Asa@3 | 1 local addonName, addonTable = ...; |
Asa@3 | 2 local addon = _G[addonName] |
Asa@3 | 3 |
Asa@3 | 4 local utils = addonTable.utils |
Asa@3 | 5 |
Asa@3 | 6 |
Asa@3 | 7 function addon:Debug(msg) |
Asa@3 | 8 if self.db.char.debug then |
Asa@3 | 9 self:Print(msg) |
Asa@3 | 10 end |
Asa@3 | 11 end |
Asa@3 | 12 |
Asa@3 | 13 local function DebugEventRegistration() |
Asa@3 | 14 addon.OriginalRegisterEvent = addon.RegisterEvent |
Asa@3 | 15 addon.OriginalUnregisterEvent = addon.UnregisterEvent |
Asa@3 | 16 |
Asa@3 | 17 function addon:RegisterEvent(event, callback, arg) |
Asa@3 | 18 self:Debug("RegisterEvent " .. event ) |
Asa@3 | 19 if arg ~= nil then |
Asa@3 | 20 addon:OriginalRegisterEvent(event, callback, arg) |
Asa@3 | 21 elseif callback ~= nil then |
Asa@3 | 22 addon:OriginalRegisterEvent(event, callback) |
Asa@3 | 23 else |
Asa@3 | 24 addon:OriginalRegisterEvent(event) |
Asa@3 | 25 end |
Asa@3 | 26 end |
Asa@3 | 27 |
Asa@3 | 28 function addon:UnregisterEvent(event) |
Asa@3 | 29 self:Debug("UnregisterEvent " .. event ) |
Asa@3 | 30 addon:OriginalUnregisterEvent (event) |
Asa@3 | 31 end |
Asa@3 | 32 |
Asa@3 | 33 end |
Asa@3 | 34 |
Asa@3 | 35 |
Asa@3 | 36 |
Asa@3 | 37 |
Asa@3 | 38 |
Asa@7 | 39 -- DebugEventRegistration() |