public
Description: WoW Powerleveling addon
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/tourguide.git
Click here to lend your support to: tourguide and make a donation at www.pledgie.com !
All-debug improvements
tekkub (author)
Mon Dec 24 00:09:24 -0800 2007
commit  9179377671699e60076c0a2f620d6db9c68de251
tree    9967978edaf55378c513d3c81fa248b9ef2b57fb
parent  96b5b66d331899442f0e6eb7cf8c54e91951e387
...
42
43
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
46
47
...
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
0
@@ -42,6 +42,31 @@ function TourGuide:CreateObjectivePanel()
0
   frame = CreateFrame("Frame", nil, UIParent)
0
   frame:SetFrameStrata("DIALOG")
0
 
0
+ if tekDebug then
0
+ local b = CreateFrame("Button", nil, frame)
0
+ b:SetPoint("TOPRIGHT", frame, "BOTTOMRIGHT", 4, -3)
0
+ b:SetWidth(80) b:SetHeight(22)
0
+
0
+ -- Fonts --
0
+ b:SetDisabledFontObject(GameFontDisable)
0
+ b:SetHighlightFontObject(GameFontHighlight)
0
+ b:SetTextFontObject(GameFontNormal)
0
+
0
+ -- Textures --
0
+ b:SetNormalTexture("Interface\\Buttons\\UI-Panel-Button-Up")
0
+ b:SetPushedTexture("Interface\\Buttons\\UI-Panel-Button-Down")
0
+ b:SetHighlightTexture("Interface\\Buttons\\UI-Panel-Button-Highlight")
0
+ b:SetDisabledTexture("Interface\\Buttons\\UI-Panel-Button-Disabled")
0
+ b:GetNormalTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ b:GetPushedTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ b:GetHighlightTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ b:GetDisabledTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ b:GetHighlightTexture():SetBlendMode("ADD")
0
+
0
+ b:SetText("Debug All")
0
+ b:SetScript("OnClick", function() self:DebugGuideSequence(true) LibStub("OptionHouse-1.1"):Open("tekDebug", "TourGuide") end)
0
+ end
0
+
0
   title = ww.SummonFontString(frame, nil, "SubZoneTextFont", nil, "BOTTOM", frame, "TOP", 0, 10)
0
   local fontname, fontheight, fontflags = title:GetFont()
0
   title:SetFont(fontname, 18, fontflags)
...
46
47
48
49
 
 
 
 
50
51
52
53
54
 
 
55
56
57
...
132
133
134
135
 
136
137
138
...
156
157
158
159
 
 
 
 
160
161
162
163
164
 
 
165
166
 
 
 
 
 
167
168
169
...
46
47
48
 
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
137
138
139
 
140
141
142
143
...
161
162
163
 
164
165
166
167
168
169
170
171
 
172
173
174
 
175
176
177
178
179
180
181
182
0
@@ -46,12 +46,17 @@ local titlematches = {"For", "A", "The", "Or", "In", "Then", "From", "To"}
0
 local function DebugQuestObjective(text, action, quest, accepts, turnins, completes)
0
   local haserrors
0
 
0
- if string.find(text, "|NODEBUG|") then return end
0
+ if (action == "A" and accepts[quest] or action == "T" and turnins[quest] or action == "C" and completes[quest]) and not string.find(text, "|NODEBUG|") then
0
+ TourGuide:DebugF(1, "%s %s -- Duplicate objective", action, quest)
0
+ haserrors = true
0
+ end
0
 
0
   if action == "A" then accepts[quest] = true
0
   elseif action == "T" then turnins[quest] = true
0
   elseif action == "C" then completes[quest] = true end
0
 
0
+ if string.find(text, "|NODEBUG|") then return haserrors end
0
+
0
   if action == "A" or action == "C" or action == "T" then
0
     -- Catch bad Title Case
0
     for _,word in pairs(titlematches) do
0
@@ -132,7 +137,7 @@ function TourGuide:LoadGuide(name, complete)
0
 end
0
 
0
 
0
-function TourGuide:DebugAllGuides(dumpquests)
0
+function TourGuide:DebugGuideSequence(dumpquests)
0
   local accepts, turnins, completes = {}, {}, {}
0
   local function DebugParse(...)
0
     local uniqueid, haserrors = 1
0
@@ -156,14 +161,22 @@ function TourGuide:DebugAllGuides(dumpquests)
0
     return haserrors
0
   end
0
 
0
- for i,name in ipairs(self.guidelist) do
0
+ self:Debug(1, "------ Begin Full Debug ------")
0
+
0
+ local name = self.db.char.currentguide
0
+ repeat
0
     if DebugParse(string.split("\n", self.guides[name]())) then
0
       self:DebugF(1, "Errors in guide: %s", name)
0
       self:Debug(1, "---------------------------")
0
     end
0
- end
0
+ name = self.nextzones[name]
0
+ until not name
0
 
0
- if dumpquests then DumpQuestDebug(accepts, turnins, completes) end
0
+ if dumpquests then
0
+ self:Debug(1, "------ Quest Continuity Debug ------")
0
+ DumpQuestDebug(accepts, turnins, completes)
0
+ end
0
+ self:Debug(1, "------ End Full Debug ------")
0
 end
0
 
0
 

Comments

    No one has commented yet.