Mercurial > wow > buffalo2
comparison ObjectiveTracker/AutoQuestPopups.lua @ 29:adcd7c328d07
code collation cleaning
| author | Nenue |
|---|---|
| date | Wed, 13 Apr 2016 21:53:24 -0400 |
| parents | c33c17dd97e7 |
| children | 7583684becf4 |
comparison
equal
deleted
inserted
replaced
| 28:c33c17dd97e7 | 29:adcd7c328d07 |
|---|---|
| 3 -- @project-revision@ @project-hash@ | 3 -- @project-revision@ @project-hash@ |
| 4 -- @file-revision@ @file-hash@ | 4 -- @file-revision@ @file-hash@ |
| 5 -- Created: 4/13/2016 7:49 PM | 5 -- Created: 4/13/2016 7:49 PM |
| 6 local B = select(2,...).frame | 6 local B = select(2,...).frame |
| 7 local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame') | 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 | 8 local print = B.print('Info') |
| 9 local lprint = B.print('Line') | |
| 10 local AutoQuest, Quest = T.AutoQuest, T.Quest | |
| 9 local ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp = ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp | 11 local ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp = ShowQuestOffer, ShowQuestComplete, RemoveAutoQuestPopUp |
| 10 local lprint = B.print('Line') | 12 local GetNumAutoQuestPopUps, GetAutoQuestPopUp, GetQuestLogIndexByID, GetQuestLogTitle = GetNumAutoQuestPopUps, GetAutoQuestPopUp, GetQuestLogIndexByID, GetQuestLogTitle |
| 11 local AutoQuest = T.AutoQuest | 13 --- Data retrieval |
| 14 function AutoQuest:GetNumWatched () | |
| 15 print(self.name, self) | |
| 16 Quest:GetNumWatched() | |
| 17 self.numWatched = GetNumAutoQuestPopUps() | |
| 12 | 18 |
| 13 --- They are not exactly quests, but the aliases used to signal that a quest was pushed into your log by the environment. | 19 return self.numWatched |
| 14 -- Once accepted they never appear again unless the quest is dropped (daily reset/abandon quest) | 20 end |
| 15 local CLICK_TO_COMPLETE = 'Click to Complete' | 21 AutoQuest.GetInfo = function(self, popupIndex) |
| 16 local CLICK_TO_ACCEPT = 'Click to Accept' | 22 |
| 23 | |
| 24 local questID, type = GetAutoQuestPopUp(popupIndex) | |
| 25 local questLogIndex = GetQuestLogIndexByID(questID) | |
| 26 local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle(questLogIndex) | |
| 27 | |
| 28 self.Info[questID] = self.Info[questID] or {} | |
| 29 local popup = self.Info[questID] | |
| 30 popup.title = title | |
| 31 popup.description = type | |
| 32 popup.popupType = type | |
| 33 popup.questID = questID | |
| 34 popup.questLogIndex = questLogIndex | |
| 35 popup.popupIndex = popupIndex | |
| 36 | |
| 37 self.Info[questID] = popup | |
| 38 self.WatchInfo[popupIndex] = popup | |
| 39 | |
| 40 | |
| 41 return self.Info[questID] | |
| 42 end | |
| 43 | |
| 17 AutoQuest.UpdateObjectives = function(handler, block) | 44 AutoQuest.UpdateObjectives = function(handler, block) |
| 18 local print = lprint | 45 local print = lprint |
| 19 if block.info.type == 'OFFER' then | 46 if block.info.type == 'OFFER' then |
| 20 block.status:SetText(CLICK_TO_ACCEPT) | 47 block.status:SetText(T.strings.CLICK_TO_ACCEPT) |
| 21 end | 48 end |
| 22 end | 49 end |
| 23 | 50 |
| 24 AutoQuest.Select = function(self) | 51 AutoQuest.Select = function(self) |
| 25 | 52 |
