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 !
Quecho - Fix quest tracker width when no player quests are being tracked 
(so that the Quecho trackes doesn't "float" far to the left)

git-svn-id: http://tekkub-wow.googlecode.com/svn/trunk/Quecho@535 
86fe6d9a-1522-0410-a387-bf9db416f0a0
tekkub (author)
Sun Sep 16 16:05:58 -0700 2007
commit  8be545c6a7cff910ff579f992bca983e7a270712
tree    735b03787011b4b0a85ab8448ae7d6af180bdae9
parent  574b542f58690e0b44a2e60f3ea0e72978927b98
...
1
2
3
4
5
6
7
8
9
10
11
12
...
66
67
68
69
70
71
72
 
73
74
75
76
77
 
78
79
 
80
81
82
...
90
91
92
93
94
95
96
97
 
 
98
99
100
...
1
 
 
 
 
 
 
 
 
2
3
4
...
58
59
60
 
 
 
 
61
62
 
63
64
65
66
67
68
69
70
71
72
...
80
81
82
 
 
 
 
 
83
84
85
86
87
0
@@ -1,12 +1,4 @@
0
 
0
-------------------------------
0
--- Are you local? --
0
-------------------------------
0
-
0
-local myname = UnitName("player")
0
-local partychat = false
0
-
0
-
0
 -------------------------------------
0
 -- Namespace Declaration --
0
 -------------------------------------
0
@@ -66,17 +58,15 @@ end
0
 ------------------------------
0
 
0
 function Quecho:UI_INFO_MESSAGE(event, msg)
0
- if not msg then return end
0
-
0
- if not msg:find("(.+): (%d+/%d+)") then return end
0
-
0
+ if not msg or not msg:find("(.+): (%d+/%d+)") then return end
0
   SendAddonMessage("Quecho", msg, "PARTY")
0
- if partychat then SendChatMessage(msg, "PARTY") end
0
 end
0
 
0
 
0
+local myname = UnitName("player")
0
 function Quecho:CHAT_MSG_ADDON(event, prefix, msg, channel, sender)
0
   if sender == myname then return end
0
+
0
   if prefix == "Quecho" then
0
     local _, _, objective, progress = msg:find("(.+): (%d+/%d+)")
0
     self:Debug(1, sender, msg, objective, progress)
0
@@ -90,11 +80,8 @@ function Quecho:CHAT_MSG_ADDON(event, prefix, msg, channel, sender)
0
 
0
     self:UpdateTracker()
0
 
0
- elseif prefix == "Quecho2" then
0
- self:Print(sender, "Quest turned in: "..msg)
0
- elseif prefix == "Quecho3" then
0
- self:Print(sender, "Quest accepted: "..msg)
0
- end
0
+ elseif prefix == "Quecho2" then self:PrintF("%s turned in %q ", sender, msg)
0
+ elseif prefix == "Quecho3" then self:PrintF("%s accepted %q ", sender, msg) end
0
 end
0
 
0
 
...
35
36
37
 
 
 
 
 
38
...
35
36
37
38
39
40
41
42
43
0
@@ -35,3 +35,8 @@ function Quecho:UpdateTracker()
0
 end
0
 
0
 
0
+local orig = QuestWatchFrame.Hide
0
+local function posthook(frame, ...) frame:SetWidth(1); return ... end
0
+QuestWatchFrame.Hide = function(frame, ...) return posthook(frame, orig(frame, ...)) end
0
+
0
+if GetNumQuestWatches() == 0 then QuestWatchFrame:SetWidth(1) end
0
\ No newline at end of file

Comments

    No one has commented yet.