Nenue@28
|
1 --- ${PACKAGE_NAME}
|
Nenue@28
|
2 -- @file-author@
|
Nenue@28
|
3 -- @project-revision@ @project-hash@
|
Nenue@28
|
4 -- @file-revision@ @file-hash@
|
Nenue@28
|
5 -- Created: 4/13/2016 7:49 PM
|
Nenue@28
|
6 local B = select(2,...).frame
|
Nenue@28
|
7 local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame')
|
Nenue@28
|
8 local _G, ipairs, max, min, unpack, floor, pairs, tostring, type, band = _G, ipairs, max, min, unpack, floor, pairs, tostring, type, bit.band
|
Nenue@28
|
9 local ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp = ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp
|
Nenue@28
|
10 local lprint = B.print('Line')
|
Nenue@28
|
11 local AutoQuest = T.AutoQuest
|
Nenue@28
|
12
|
Nenue@28
|
13 --- They are not exactly quests, but the aliases used to signal that a quest was pushed into your log by the environment.
|
Nenue@28
|
14 -- Once accepted they never appear again unless the quest is dropped (daily reset/abandon quest)
|
Nenue@28
|
15 local CLICK_TO_COMPLETE = 'Click to Complete'
|
Nenue@28
|
16 local CLICK_TO_ACCEPT = 'Click to Accept'
|
Nenue@28
|
17 AutoQuest.UpdateObjectives = function(handler, block)
|
Nenue@28
|
18 local print = lprint
|
Nenue@28
|
19 if block.info.type == 'OFFER' then
|
Nenue@28
|
20 block.status:SetText(CLICK_TO_ACCEPT)
|
Nenue@28
|
21 end
|
Nenue@28
|
22 end
|
Nenue@28
|
23
|
Nenue@28
|
24 AutoQuest.Select = function(self)
|
Nenue@28
|
25
|
Nenue@28
|
26 if self.info.popupType == 'OFFER' then
|
Nenue@28
|
27 ShowQuestOffer(self.info.questIndex)
|
Nenue@28
|
28 else
|
Nenue@28
|
29 ShowQuestComplete(self.info.questIndex)
|
Nenue@28
|
30 end
|
Nenue@28
|
31 RemoveAutoQuestPopUp(self.info.questID)
|
Nenue@28
|
32 end
|
Nenue@28
|
33
|
Nenue@28
|
34 AutoQuest.Link = T.Quest.Link
|