Mercurial > wow > buffalo2
view ObjectiveTracker/AutoQuestPopups.lua @ 28:c33c17dd97e7
file renames
author | Nenue |
---|---|
date | Wed, 13 Apr 2016 20:19:37 -0400 |
parents | |
children | adcd7c328d07 |
line wrap: on
line source
--- ${PACKAGE_NAME} -- @file-author@ -- @project-revision@ @project-hash@ -- @file-revision@ @file-hash@ -- Created: 4/13/2016 7:49 PM local B = select(2,...).frame local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame') local _G, ipairs, max, min, unpack, floor, pairs, tostring, type, band = _G, ipairs, max, min, unpack, floor, pairs, tostring, type, bit.band local ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp = ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp local lprint = B.print('Line') local AutoQuest = T.AutoQuest --- They are not exactly quests, but the aliases used to signal that a quest was pushed into your log by the environment. -- Once accepted they never appear again unless the quest is dropped (daily reset/abandon quest) local CLICK_TO_COMPLETE = 'Click to Complete' local CLICK_TO_ACCEPT = 'Click to Accept' AutoQuest.UpdateObjectives = function(handler, block) local print = lprint if block.info.type == 'OFFER' then block.status:SetText(CLICK_TO_ACCEPT) end end AutoQuest.Select = function(self) if self.info.popupType == 'OFFER' then ShowQuestOffer(self.info.questIndex) else ShowQuestComplete(self.info.questIndex) end RemoveAutoQuestPopUp(self.info.questID) end AutoQuest.Link = T.Quest.Link