Skip to content

Commit bdd220d

Browse files
committedNov 30, 2009
Add RAF mode
1 parent c974d30 commit bdd220d

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed
 

‎Config.lua

+11
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@ frame:SetScript("OnShow", function()
108108
end
109109
end)
110110

111+
local rafmode = tekcheck.new(frame, nil, L["Recruit-a-friend mode"], "TOPLEFT", mapquestgivernotes, "BOTTOMLEFT", -GAP*2, -GAP)
112+
rafmode.tiptext = L["Use recruit-a-friend modifications to guides, if present."]
113+
rafmode:SetScript("OnClick", function(self)
114+
checksound(self)
115+
TourGuide.db.char.rafmode = not TourGuide.db.char.rafmode
116+
TourGuide:LoadGuide(TourGuide.db.char.currentguide)
117+
TourGuide:UpdateStatusFrame()
118+
TourGuide:UpdateGuidesPanel()
119+
end)
120+
rafmode:SetChecked(TourGuide.db.char.rafmode)
121+
111122
frame:SetScript("OnShow", nil)
112123
end)
113124

‎Parser.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ local function ParseQuests(...)
4848
local text = select(j, ...)
4949
local _, _, classes = text:find("|C|([^|]+)|")
5050
local _, _, races = text:find("|R|([^|]+)|")
51+
local noraf = text:match("|NORAF|")
52+
local raf = text:match("|RAF|")
5153

52-
if text ~= "" and (not classes or classes:find(myclass)) and (not races or races:find(myrace)) then
54+
if text ~= "" and ((TourGuide.db.char.rafmode and not noraf) or (not TourGuide.db.char.rafmode and not raf)) and (not classes or classes:find(myclass)) and (not races or races:find(myrace)) then
5355
local _, _, action, quest, tag = text:find("^(%a) ([^|]*)(.*)")
5456
assert(actiontypes[action], "Unknown action: "..text)
5557
quest = quest:trim()

‎TourGuide.lua

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function TourGuide:Initialize()
4545
showstatusframe = true,
4646
showuseitem = true,
4747
showuseitemcomplete = true,
48+
rafmode = false,
4849
},
4950
})
5051
if self.db.char.turnedin then self.db.char.turnedin = nil end -- Purge old table if present

0 commit comments

Comments
 (0)
Please sign in to comment.