Mercurial > wow > buffalo2
comparison ObjectiveInfo.lua @ 13:9455693fc290
Init
- recall XML display state on reload
ObjectiveFrame
- quest coloring by relative level
- quest coloring by daily/weekly/complete status
- remember starting scroll value between reload
- limit anchor points to edges for regions affected by style attributes
ObjectiveInfo
- AutoQuest outline definitions
- Pull Quest title and tag data in addition to WatchInfo
ObjectiveStyle
- ensure consistent style table
- hardcode certain attributes for sanity
XML
- ensure consistent naming conventions for heading and content elements
- ensure hardcore anchors are based on edges
- expansion of file structure to deal with complexities of dynamic widgets and style caching
ObjectiveUI
- determine primary style by block handler when restoring original style
- moved framescript to 'ObjectiveWidgets' lua
| author | Nenue |
|---|---|
| date | Sat, 02 Apr 2016 17:46:52 -0400 |
| parents | 7923243ae972 |
| children | ed642234f017 |
comparison
equal
deleted
inserted
replaced
| 12:8238cddaddb1 | 13:9455693fc290 |
|---|---|
| 7 | 7 |
| 8 local Tracker, AutoQuest, Quest, Cheevs = mod.Tracker, mod.AutoQuest, mod.Quest, mod.Cheevs | 8 local Tracker, AutoQuest, Quest, Cheevs = mod.Tracker, mod.AutoQuest, mod.Quest, mod.Cheevs |
| 9 -------------------------------------------------------------------- | 9 -------------------------------------------------------------------- |
| 10 --- Tracker-specific data retrieval functions | 10 --- Tracker-specific data retrieval functions |
| 11 -------------------------------------------------------------------- | 11 -------------------------------------------------------------------- |
| 12 | |
| 13 | |
| 14 ----------------------------- | |
| 15 --- AUTO_QUEST | |
| 16 AutoQuest.name = "Remote Quests" | |
| 17 AutoQuest.GetNumWatched = GetNumAutoQuestPopUps | |
| 18 AutoQuest.GetInfo = function(watchIndex) | |
| 19 return Quest.GetInfo(watchIndex) | |
| 20 end | |
| 21 | |
| 22 ----------------------------- | |
| 23 --- QUEST | |
| 24 Quest.name = "Quests" | |
| 12 Quest.itemButtons = {} | 25 Quest.itemButtons = {} |
| 13 Quest.freeButtons = {} | 26 Quest.freeButtons = {} |
| 14 Quest.POI = {} | 27 Quest.POI = {} |
| 15 Quest.QuestBlock = {} | 28 Quest.QuestBlock = {} |
| 16 Quest.GetNumWatched = function() | 29 Quest.GetNumWatched = function() |
| 18 end | 31 end |
| 19 Quest.GetInfo = function (self, watchIndex) | 32 Quest.GetInfo = function (self, watchIndex) |
| 20 print('|cFF00DDFFQuest|r.|cFF0088FFGetInfo(|r'.. tostring(watchIndex)..'|r)') | 33 print('|cFF00DDFFQuest|r.|cFF0088FFGetInfo(|r'.. tostring(watchIndex)..'|r)') |
| 21 local questID, title, questIndex, numObjectives, requiredMoney, isComplete, | 34 local questID, title, questIndex, numObjectives, requiredMoney, isComplete, |
| 22 startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(watchIndex) | 35 startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(watchIndex) |
| 36 | |
| 37 local _, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle(questIndex) | |
| 38 local questTagID, tagName = GetQuestTagInfo(questID); | |
| 39 | |
| 23 if not questID then | 40 if not questID then |
| 24 return | 41 return |
| 25 end | 42 end |
| 26 self.Info[questID] = self.Info[questID] or {} | 43 self.Info[questID] = self.Info[questID] or {} |
| 27 | 44 |
| 28 local q = self.Info[questID] | 45 local q = self.Info[questID] |
| 29 q.watchIndex = watchIndex | 46 q.watchIndex = watchIndex |
| 30 q.type = 'Quest' | 47 q.type = 'Quest' |
| 31 q.questID = questID | 48 q.questID = questID |
| 32 q.title = title | 49 q.title = title |
| 50 q.level = level | |
| 33 q.questLogIndex = questIndex | 51 q.questLogIndex = questIndex |
| 34 q.numObjectives = numObjectives | 52 q.numObjectives = numObjectives |
| 35 q.requiredMoney = requiredMoney | 53 q.requiredMoney = requiredMoney |
| 36 q.isComplete = isComplete | 54 q.isComplete = isComplete |
| 37 q.startEvent = startEvent | 55 q.startEvent = startEvent |
| 42 q.isTask = isTask | 60 q.isTask = isTask |
| 43 q.isStory = isStory | 61 q.isStory = isStory |
| 44 q.isOnMap = isOnMap | 62 q.isOnMap = isOnMap |
| 45 q.hasLocalPOI = hasLocalPOI | 63 q.hasLocalPOI = hasLocalPOI |
| 46 | 64 |
| 47 --- Start QuestLogEntry calls | 65 q.isDaily = ( frequency == LE_QUEST_FREQUENCY_DAILY and (not isComplete or isComplete == 0) ) |
| 48 ----------------------------------------- | 66 q.isWeekly = ( frequency == LE_QUEST_FREQUENCY_WEEKLY and (not isComplete or isComplete == 0) ) |
| 49 SelectQuestLogEntry(questIndex) | 67 q.isComplete = isComplete |
| 50 q.greenRange = GetQuestGreenRange() | 68 q.isStory = isStory |
| 51 q.isDaily = QuestIsDaily() | 69 q.isTask = isTask |
| 52 q.isWeekly = QuestIsWeekly() | 70 --q.isBreadCrumb = isBreadCrumb |
| 53 ----------------------------------------- | |
| 54 --- End QuestLogEntry calls | |
| 55 | |
| 56 q.isComplete = IsQuestComplete(questID) | |
| 57 q.isBreadCrumb = IsBreadcrumbQuest(questID) | |
| 58 q.isStoryQuest = IsStoryQuest(questID) | |
| 59 q.completionText= GetQuestLogCompletionText(questIndex) | 71 q.completionText= GetQuestLogCompletionText(questIndex) |
| 60 q.numObjectives = GetNumQuestLeaderBoards(questIndex) | 72 q.numObjectives = GetNumQuestLeaderBoards(questIndex) |
| 61 q.isWatched = IsQuestWatched(questIndex) | 73 q.isWatched = IsQuestWatched(questIndex) |
| 74 q.isHardWatched = IsQuestHardWatched(questIndex) | |
| 62 q.objectives = {} | 75 q.objectives = {} |
| 63 for i = 1, q.numObjectives do | 76 for i = 1, q.numObjectives do |
| 64 local text, type, finished = GetQuestLogLeaderBoard(i, questIndex) | 77 local text, type, finished = GetQuestLogLeaderBoard(i, questIndex) |
| 65 q.objectives[i] = { | 78 q.objectives[i] = { |
| 66 type = type, | 79 type = type, |
| 119 local distance, onContinent = GetDistanceSqToQuest(info.questIndex) | 132 local distance, onContinent = GetDistanceSqToQuest(info.questIndex) |
| 120 end | 133 end |
| 121 end | 134 end |
| 122 end | 135 end |
| 123 | 136 |
| 124 AutoQuest.GetInfo = function(watchIndex) | |
| 125 return Quest.GetInfo(watchIndex) | |
| 126 end | |
| 127 | |
| 128 | 137 |
| 129 Cheevs.GetNumWatched = function(self) | 138 Cheevs.GetNumWatched = function(self) |
| 130 Cheevs.trackedCheevs = {GetTrackedAchievements()} | 139 Cheevs.trackedCheevs = {GetTrackedAchievements()} |
| 131 return GetNumTrackedAchievements() | 140 return GetNumTrackedAchievements() |
| 132 end | 141 end |
