Nenue@28: --- ${PACKAGE_NAME} Nenue@28: -- @file-author@ Nenue@28: -- @project-revision@ @project-hash@ Nenue@28: -- @file-revision@ @file-hash@ Nenue@28: -- Created: 4/13/2016 7:49 PM Nenue@28: local B = select(2,...).frame Nenue@28: local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame') Nenue@29: local print = B.print('Info') Nenue@29: local lprint = B.print('Line') Nenue@29: local AutoQuest, Quest = T.AutoQuest, T.Quest Nenue@28: local ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp = ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp Nenue@29: local GetNumAutoQuestPopUps, GetAutoQuestPopUp, GetQuestLogIndexByID, GetQuestLogTitle = GetNumAutoQuestPopUps, GetAutoQuestPopUp, GetQuestLogIndexByID, GetQuestLogTitle Nenue@29: --- Data retrieval Nenue@29: function AutoQuest:GetNumWatched () Nenue@29: print(self.name, self) Nenue@29: Quest:GetNumWatched() Nenue@29: self.numWatched = GetNumAutoQuestPopUps() Nenue@28: Nenue@29: return self.numWatched Nenue@29: end Nenue@29: AutoQuest.GetInfo = function(self, popupIndex) Nenue@29: Nenue@29: Nenue@29: local questID, type = GetAutoQuestPopUp(popupIndex) Nenue@29: local questLogIndex = GetQuestLogIndexByID(questID) Nenue@29: local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle(questLogIndex) Nenue@29: Nenue@29: self.Info[questID] = self.Info[questID] or {} Nenue@29: local popup = self.Info[questID] Nenue@30: popup.questID = questID Nenue@30: popup.id = questID Nenue@29: popup.title = title Nenue@29: popup.description = type Nenue@29: popup.popupType = type Nenue@29: popup.questLogIndex = questLogIndex Nenue@29: popup.popupIndex = popupIndex Nenue@29: Nenue@29: self.Info[questID] = popup Nenue@29: self.WatchInfo[popupIndex] = popup Nenue@29: Nenue@29: Nenue@29: return self.Info[questID] Nenue@29: end Nenue@29: Nenue@28: AutoQuest.UpdateObjectives = function(handler, block) Nenue@28: local print = lprint Nenue@28: if block.info.type == 'OFFER' then Nenue@29: block.status:SetText(T.strings.CLICK_TO_ACCEPT) Nenue@28: end Nenue@28: end Nenue@28: Nenue@28: AutoQuest.Select = function(self) Nenue@28: Nenue@28: if self.info.popupType == 'OFFER' then Nenue@28: ShowQuestOffer(self.info.questIndex) Nenue@28: else Nenue@28: ShowQuestComplete(self.info.questIndex) Nenue@28: end Nenue@28: RemoveAutoQuestPopUp(self.info.questID) Nenue@28: end Nenue@28: Nenue@28: AutoQuest.Link = T.Quest.Link