public
Description: WoW Addon - Echos quest objective completion to your party
Homepage: http://www.tekkub.net
Clone URL: git://github.com/tekkub/quecho.git
Click here to lend your support to: quecho and make a donation at www.pledgie.com !
De-dongle
tekkub (author)
Fri May 09 10:23:41 -0700 2008
commit  ac2c4534b1dfdbc36731af0632e5bfd63a21c099
tree    cbcdd2046ddb54256dabf097ee1e8b9f05e1a2a6
parent  deaa50a95e6da7907146579e13ddaafb069e3663
...
3
4
5
6
 
7
8
9
10
11
12
13
14
15
 
 
 
 
 
 
 
 
 
 
 
16
 
 
17
18
19
20
21
22
 
 
 
 
 
 
 
23
24
25
 
 
 
26
27
28
29
30
31
32
33
34
35
...
40
41
42
43
44
45
46
...
70
71
72
73
74
75
76
...
3
4
5
 
6
7
8
 
 
 
 
 
 
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
 
 
 
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
44
45
46
...
51
52
53
 
54
55
56
...
80
81
82
 
83
84
85
0
@@ -3,33 +3,44 @@
0
 -- Namespace Declaration --
0
 -------------------------------------
0
 
0
-Quecho = DongleStub("Dongle-1.0"):New("Quecho")
0
+Quecho = {}
0
 
0
 
0
-function Quecho:Initialize()
0
- self.quests = setmetatable({}, {__index = function (t,i)
0
- local v = {}
0
- rawset(t, i, v)
0
- return v
0
- end})
0
-end
0
+Quecho.quests = setmetatable({}, {__index = function (t,i)
0
+ local v = {}
0
+ rawset(t, i, v)
0
+ return v
0
+end})
0
+
0
+
0
+local f = CreateFrame("Frame")
0
+f:SetScript("OnEvent", function(frame, event, ...) if Quecho[event] then return Quecho[event](Quecho, event, ...) end end)
0
+f:RegisterEvent("ADDON_LOADED")
0
+
0
 
0
+function Quecho:ADDON_LOADED(event, addon)
0
+ if addon ~= "Quecho" then return end
0
 
0
-function Quecho:Enable()
0
- self:RegisterEvent("UI_INFO_MESSAGE")
0
- self:RegisterEvent("CHAT_MSG_ADDON")
0
- self:RegisterEvent("QUEST_LOG_UPDATE")
0
   self:QUEST_LOG_UPDATE()
0
+
0
+ f:RegisterEvent("UI_INFO_MESSAGE")
0
+ f:RegisterEvent("CHAT_MSG_ADDON")
0
+ f:RegisterEvent("QUEST_LOG_UPDATE")
0
+
0
+ f:UnregisterEvent("ADDON_LOADED")
0
+ self.ADDON_LOADED = nil
0
 end
0
 
0
 
0
+function Quecho:PrintF(...) ChatFrame1:AddMessage(string.format(...)) end
0
+
0
+
0
 ---------------------------
0
 -- Reset timer --
0
 ---------------------------
0
 
0
 local DELAY = 60 * 5
0
 local sendtimes, nextpurge = {}
0
-local f = CreateFrame("Frame")
0
 local function OnUpdate(f)
0
   if not nextpurge then f:SetScript("OnUpdate", nil) end
0
 
0
@@ -40,7 +51,6 @@ local function OnUpdate(f)
0
       for objective in pairs(objectives) do
0
         local t = sendtimes[sender..objective]
0
         if (t + DELAY) <= now then
0
- Quecho:Debug(1, "Purging", sender..objective)
0
           sendtimes[sender..objective] = nil
0
           Quecho.quests[sender][objective] = nil
0
         elseif not next2 or t < next2 then next2 = t end
0
@@ -70,7 +80,6 @@ function Quecho:CHAT_MSG_ADDON(event, prefix, msg, channel, sender)
0
 
0
   if prefix == "Quecho" then
0
     local _, _, objective, progress = msg:find("(.+): (%d+/%d+)")
0
- self:Debug(1, sender, msg, objective, progress)
0
 
0
     sendtimes[sender..objective] = GetTime()
0
     if not nextpurge then
...
6
7
8
9
10
11
12
13
14
15
16
17
...
6
7
8
 
 
9
10
11
 
 
12
13
0
@@ -6,12 +6,8 @@
0
 ## Version: Alpha
0
 ## X-Category: Quest
0
 
0
-## OptionalDeps: Dongle
0
-
0
 ## LoadManagers: AddonLoader
0
 ## X-LoadOn-Group: true
0
 
0
-Dongle.lua
0
-
0
 Quecho.lua
0
 Tracker.lua

Comments

    No one has commented yet.