comparison ObjectiveInfo.lua @ 8:7923243ae972

ObjectiveUI & ObjectiveEvents - securehook to API calls for compatibility with addons that work with the objective tracking interface - let the API hooks invoke ObjectiveUI functions when possible - ObjectiveUI framescript handlers should use the corresponding API call if possible, so that addon space can be fully aware of our actions - Sanity check cached data when possible during 'Remove' hooks ObjectiveInfo - Add cheevID to criteria info ObjectiveCore - Index quest tracker blocks by their watch offset, and use that to verify whether the given block frame should be released into pool ObjectiveFrame - Differentiate between visible and non-visible unused buttons, and only release when their quest has been dropped
author Nenue
date Fri, 01 Apr 2016 14:40:14 -0400
parents 589de8ea05b9
children 9455693fc290
comparison
equal deleted inserted replaced
7:5301c68f28d8 8:7923243ae972
55 55
56 q.isComplete = IsQuestComplete(questID) 56 q.isComplete = IsQuestComplete(questID)
57 q.isBreadCrumb = IsBreadcrumbQuest(questID) 57 q.isBreadCrumb = IsBreadcrumbQuest(questID)
58 q.isStoryQuest = IsStoryQuest(questID) 58 q.isStoryQuest = IsStoryQuest(questID)
59 q.completionText= GetQuestLogCompletionText(questIndex) 59 q.completionText= GetQuestLogCompletionText(questIndex)
60 q.trackingID = questID
61 q.superTracked = (questID == GetSuperTrackedQuestID()) -- call directly so artifact data doesn't become an issue
62 q.numObjectives = GetNumQuestLeaderBoards(questIndex) 60 q.numObjectives = GetNumQuestLeaderBoards(questIndex)
63 q.isWatched = IsQuestWatched(questIndex) 61 q.isWatched = IsQuestWatched(questIndex)
64 q.objectives = {} 62 q.objectives = {}
65 for i = 1, q.numObjectives do 63 for i = 1, q.numObjectives do
66 local text, type, finished = GetQuestLogLeaderBoard(i, questIndex) 64 local text, type, finished = GetQuestLogLeaderBoard(i, questIndex)
103 onContinent = onContinent 101 onContinent = onContinent
104 } 102 }
105 end 103 end
106 end 104 end
107 105
106 q.superTracked = (questID == GetSuperTrackedQuestID()) -- call directly so artifact data doesn't become an issue
107 self.WatchInfo[watchIndex] = q
108 self.LogInfo[questIndex] = q 108 self.LogInfo[questIndex] = q
109 print('- logIndex =', questIndex, 'title =', title) 109 print('- logIndex =', questIndex, 'title =', title)
110 return q 110 return q
111 end 111 end
112 112
145 c.numObjectives = GetAchievementNumCriteria(cheevID) 145 c.numObjectives = GetAchievementNumCriteria(cheevID)
146 c.objectives = {} 146 c.objectives = {}
147 for i = 1, c.numObjectives do 147 for i = 1, c.numObjectives do
148 local description, type, completed, quantity, requiredQuantity, characterName, flags, assetID, quantityString, criteriaID = GetAchievementCriteriaInfo(cheevID, i) 148 local description, type, completed, quantity, requiredQuantity, characterName, flags, assetID, quantityString, criteriaID = GetAchievementCriteriaInfo(cheevID, i)
149 c.objectives[i] = { 149 c.objectives[i] = {
150 cheevID = cheevID,
150 text = description, 151 text = description,
151 type = type, 152 type = type,
152 finished = completed, 153 finished = completed,
153 quantity = quantity, 154 quantity = quantity,
154 requiredQuantity = requiredQuantity, 155 requiredQuantity = requiredQuantity,