comparison ObjectiveTracker/AutoQuestPopups.lua @ 28:c33c17dd97e7

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