Skip to content

Commit

Permalink
Add config option to map questgivers if LH is present
Browse files Browse the repository at this point in the history
  • Loading branch information
tekkub committed May 12, 2008
1 parent b6540d2 commit 3a7a952
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ frame:SetScript("OnShow", function()
qtrack:SetScript("OnClick", function(self) checksound(self); TourGuide.db.char.trackquests = not TourGuide.db.char.trackquests end)
qtrack:SetChecked(TourGuide.db.char.trackquests)

local mapquestgivers = tekcheck.new(frame, nil, "Automatically map questgivers", "TOPLEFT", qtrack, "BOTTOMLEFT", 0, -GAP)
mapquestgivers.tiptext = "Automatically map questgivers for accept and turnin objectives (requires LightHeaded)."
mapquestgivers:SetScript("OnClick", function(self) checksound(self); TourGuide.db.char.mapquestgivers = not TourGuide.db.char.mapquestgivers end)
mapquestgivers:SetChecked(TourGuide.db.char.mapquestgivers)

frame:SetScript("OnShow", nil)
end)

Expand Down
2 changes: 2 additions & 0 deletions Mapping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ end


function TourGuide:MapLightHeadedNPC(qid, action, quest)
if not TourGuide.db.char.mapquestgivers then return end

local npcid, npcname, stype
if action == "ACCEPT" then _, _, _, _, stype, npcname, npcid = LightHeaded:GetQuestInfo(qid)
else _, _, _, _, _, _, _, stype, npcname, npcid = LightHeaded:GetQuestInfo(qid) end
Expand Down
1 change: 1 addition & 0 deletions TourGuide.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function TourGuide:Initialize()
completion = {},
currentguide = "No Guide",
petskills = {},
mapquestgivers = true,
},
})
if self.db.char.turnedin then self.db.char.turnedin = nil end -- Purge old table if present
Expand Down

0 comments on commit 3a7a952

Please sign in to comment.