2 local TourGuide
= TourGuide
3 local L
= TourGuide
.Locale
6 function TourGuide
:IsQuestAcceptable(name
)
7 for i
,v
in pairs(self
.actions
) do
8 if (v
== "ACCEPT" or v
== "COMPLETE") and self
.quests
[i
]:gsub(L
.PART_GSUB
, "") == name
then return true end
13 local notlisted
= CreateFrame("Frame", nil, QuestFrame
)
14 notlisted
:SetFrameStrata("DIALOG")
15 notlisted
:SetWidth(32)
16 notlisted
:SetHeight(32)
17 notlisted
:SetPoint("TOPLEFT", 70, -45)
20 notlisted
:RegisterEvent("QUEST_DETAIL")
21 notlisted
:RegisterEvent("QUEST_COMPLETE")
22 notlisted
:RegisterEvent("QUEST_FINISHED")
23 notlisted
:SetScript("OnEvent", function(self
, event
)
24 if event
~= "QUEST_DETAIL" then return self
:Hide() end
25 local quest
= GetTitleText()
26 if quest
and TourGuide
:IsQuestAcceptable(quest
) then self
:Hide()
31 local nltex
= notlisted
:CreateTexture()
33 nltex
:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark")
35 local text
= notlisted
:CreateFontString(nil, "OVERLAY", "GameFontNormal")
36 text
:SetPoint("TOPLEFT", notlisted
, "TOPRIGHT")
37 text
:SetPoint("BOTTOMLEFT", notlisted
, "BOTTOMRIGHT")
38 text
:SetPoint("RIGHT", notlisted
, "RIGHT", 200, 0)
39 text
:SetText("|cffff4500This quest is not listed in your current guide")