1 QuestHelper_File
["manager_completed.lua"] = "Development Version"
2 QuestHelper_Loadtime
["manager_completed.lua"] = GetTime()
4 local completed_active
= false
7 function QH_Incomplete()
8 if QueryQuestsCompleted
then
9 completed_active
= not completed_active
10 if completed_active
then
11 QuestHelper
:TextOut("Activating incomplete quest list. Please check your map.")
13 QuestHelper
:TextOut("Deactivating incomplete quest list.")
17 QuestHelper
:TextOut("This feature isn't available until the WoW 3.3 patch. Sorry!")
21 if not QueryQuestsCompleted
then return end
26 local temp_notifications
= {}
28 function QH_GetCompletedTable()
32 local notifications
= {}
34 function QH_AddCompletionNotifier(func
)
35 table.insert(notifications
, func
)
38 local function notify()
39 for _
, v
in ipairs(notifications
) do
44 local poll_again
= true
45 local poll_timeout
= GetTime() + 30
46 local poll_first
= true
48 QH_Event("QUEST_QUERY_COMPLETE", function ()
49 quests
= GetQuestsCompleted() -- entertainingly, we actually want exactly the output of this. How convenient! Blizzard does things right <3 forever
54 local GetQuestReward_Orig
= GetQuestReward
55 GetQuestReward
= function (...)
57 GetQuestReward_Orig(...)
60 QH_OnUpdate(function()
61 if poll_again
and poll_timeout
< GetTime() then
62 QueryQuestsCompleted()
67 end, "quest_completed")
71 -- now over here we're rigging up something to scatter waypoints all over the goddamn map
72 -- we're just tossing them out like sprinkles
73 -- neon lozenges, scattered upon the ground
74 -- colors across the leaves, sucrose stars hangin' out across the foliage
75 -- here comes a squirrel
76 -- oh look it is eating the candy! how adorable
77 -- we should take it home and keep it as a pet
78 -- now you understand waypoints.
83 if not waypoint_zone
then return end
84 if not QuestHelper
.Astrolabe
.WorldMapVisible
then return end
88 if not completed_active
then return end
90 local questlist
= DB_GetItem("questlist", waypoint_zone
, true)
91 if not questlist
then return end
93 local donequests
= QH_GetCompletedTable()
95 for _
, v
in ipairs(questlist
) do
99 --print("Not done:", v)
100 local ql
= DB_GetItem("quest", v
)
102 --print(ql.start.loc)
103 --print(ql.start.loc[1])
104 QH_POI_Add(waypoint_zone
, ql
.start
.loc
[1].x
, ql
.start
.loc
[1].y
, string.format("%s (quest #%d)", ql
.name
or "(unknown quest name)", v
))
108 QH_AddCompletionNotifier(rescan
)
110 QH_Event("WORLD_MAP_UPDATE", function ()
111 local c
, z
= QuestHelper
.Astrolabe
:GetCurrentVirtualMapCZ()
113 if not QuestHelper_IndexLookup
[c
] or not QuestHelper_IndexLookup
[c
][z
] then return end
114 QuestHelper
: Assert(QuestHelper_IndexLookup
[c
])
115 QuestHelper
: Assert(QuestHelper_IndexLookup
[c
][z
])
116 waypoint_zone
= QuestHelper_IndexLookup
[c
][z
]