Mercurial > wow > itemauditor
comparison Modules/Events.lua @ 38:e27d13095b49
Added the ability to suspend and resume ItemAuditor (Ticket #8). To access this feature use "/ia suspend".
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Sun, 18 Jul 2010 22:46:35 -0700 |
parents | f5d384fe7e4a |
children | 003de902ae64 |
comparison
equal
deleted
inserted
replaced
37:9bd18fce8498 | 38:e27d13095b49 |
---|---|
1 local addonName, addonTable = ...; | 1 local addonName, addonTable = ...; |
2 local addon = _G[addonName] | 2 local addon = _G[addonName] |
3 | 3 |
4 local utils = addonTable.utils | 4 local utils = addonTable.utils |
5 | 5 |
6 function addon:PLAYER_ENTERING_WORLD() | 6 function addon:OnEnable() |
7 self:RegisterEvent("MAIL_SHOW") | 7 self:RegisterEvent("MAIL_SHOW") |
8 self:RegisterEvent("UNIT_SPELLCAST_START") | 8 self:RegisterEvent("UNIT_SPELLCAST_START") |
9 addon:UpdateCurrentInventory() | 9 addon:UpdateCurrentInventory() |
10 self:WatchBags() | 10 self:WatchBags() |
11 | 11 |
12 -- addon:ConvertItems() | 12 self:SetEnabled(nil, self.db.profile.addon_enabled) |
13 end | |
14 | |
15 function addon:OnDisable() | |
16 self:UnwatchBags() | |
17 self:UnregisterAllEvents() | |
18 addon:HideAllFrames() | |
13 end | 19 end |
14 | 20 |
15 function addon:MAIL_SHOW() | 21 function addon:MAIL_SHOW() |
16 self:Debug("MAIL_SHOW") | 22 self:Debug("MAIL_SHOW") |
17 addon:UpdateCurrentInventory() | 23 addon:UpdateCurrentInventory() |