Mercurial > wow > inventory
comparison Modules/Alerts.lua @ 202:15f22a466596
Cleaning up.
| author | Zerotorescue |
|---|---|
| date | Sat, 05 Feb 2011 17:36:08 +0100 |
| parents | 5cee31b1418a |
| children | 4f5e114fe15f |
comparison
equal
deleted
inserted
replaced
| 201:bfab0c870d1e | 202:15f22a466596 |
|---|---|
| 1 local addon = select(2, ...); | 1 local addon = select(2, ...); |
| 2 local mod = addon:NewModule("Alerts", "AceEvent-3.0", "AceTimer-3.0"); | 2 local mod = addon:NewModule("Alerts", "AceTimer-3.0"); |
| 3 | 3 |
| 4 local queue, cache = {}, {}; | 4 local queue, cache = {}, {}; |
| 5 | 5 |
| 6 function mod:OnEnable() | 6 function mod:OnEnable() |
| 7 addon:Debug("Alerts:OnEnable"); | 7 addon:Debug("Alerts:OnEnable"); |
| 11 addon:RegisterSlash(function(this) | 11 addon:RegisterSlash(function(this) |
| 12 mod:Scan(true); | 12 mod:Scan(true); |
| 13 end, { "a", "alert" }, "|Hfunction:InventoriumCommandHandler:alert|h|cff00fff7/im alert|r|h (or /im a) - Rescan the items within all tracked groups and show item alerts for those items missing."); | 13 end, { "a", "alert" }, "|Hfunction:InventoriumCommandHandler:alert|h|cff00fff7/im alert|r|h (or /im a) - Rescan the items within all tracked groups and show item alerts for those items missing."); |
| 14 | 14 |
| 15 mod:Scan(false); | 15 mod:Scan(false); |
| 16 | |
| 17 --[[if addon.db.profile.defaults.scanInterval["00Login"] then | |
| 18 self:RegisterEvent("PLAYER_LOGIN", "Scan"); | |
| 19 end | |
| 20 | |
| 21 if addon.db.profile.defaults.scanInterval["01Repeat5"] then | |
| 22 self:ScheduleTimer("Scan", 5 * 60); | |
| 23 elseif addon.db.profile.defaults.scanInterval["01Repeat10"] then | |
| 24 self:ScheduleTimer("Scan", 10 * 60); | |
| 25 elseif addon.db.profile.defaults.scanInterval["01Repeat15"] then | |
| 26 self:ScheduleTimer("Scan", 15 * 60); | |
| 27 elseif addon.db.profile.defaults.scanInterval["01Repeat30"] then | |
| 28 self:ScheduleTimer("Scan", 30 * 60); | |
| 29 elseif addon.db.profile.defaults.scanInterval["01Repeat60"] then | |
| 30 self:ScheduleTimer("Scan", 60 * 60); | |
| 31 elseif addon.db.profile.defaults.scanInterval["01Repeat120"] then | |
| 32 self:ScheduleTimer("Scan", 120 * 60); | |
| 33 end]] | |
| 34 end | 16 end |
| 35 | 17 |
| 36 local scanTypes = { | 18 local scanTypes = { |
| 37 Local = "local", | 19 Local = "local", |
| 38 Global = "global", | 20 Global = "global", |
