comparison ObjectiveTracker/BonusObjectives.lua @ 37:e84d645c8ab8

- revised the tracker update function to build its complete data list up front and use the values as points of comparison for determining possible out of place blocks, which will be iterated over afterward to remove what wasn't re-used - also entailed revising the exact role of global event handlers and function hooks, limiting their directions of communication so one doesn't end up calling the other multiple or inifinity times - schema handling polish
author Nenue
date Mon, 18 Apr 2016 07:56:23 -0400
parents a487841050be
children 1f8f9cc3d956
comparison
equal deleted inserted replaced
36:a487841050be 37:e84d645c8ab8
84 Bonus.POI = {} 84 Bonus.POI = {}
85 Bonus.Scenario = {} 85 Bonus.Scenario = {}
86 Bonus.QuestBlock = {} 86 Bonus.QuestBlock = {}
87 Bonus.WatchInfo = {} 87 Bonus.WatchInfo = {}
88 function Bonus:GetNumWatched () 88 function Bonus:GetNumWatched ()
89 if true then return 0, 0, nil end
89 local print = iprint 90 local print = iprint
90 print(self.name, self) 91 print(self.name, self)
91 92
92 local tasks = InternalGetTasksTable() 93 local tasks = InternalGetTasksTable()
93 local numWatched = 0 94 local numWatched = 0
255 256
256 attachment.value = percent 257 attachment.value = percent
257 attachment.maxValue = 100 258 attachment.maxValue = 100
258 attachment:SetPoint('TOP', line, 'TOP', 0, 0) 259 attachment:SetPoint('TOP', line, 'TOP', 0, 0)
259 attachment.status:SetFormattedText(PERCENTAGE_STRING, percent) 260 attachment.status:SetFormattedText(PERCENTAGE_STRING, percent)
261 attachment:SetParent(handler.frame)
260 print(attachment.status:GetText()) 262 print(attachment.status:GetText())
261 print(' |cFFFF0022** text:|r', data.text, '|cFFFF0022value:|r', data.value, '|cFFFF0022max:|r', data.maxValue) 263 print(' |cFFFF0022** text:|r', data.text, '|cFFFF0022value:|r', data.value, '|cFFFF0022max:|r', data.maxValue)
262 end 264 end
263 text = data.text 265 text = data.text
264 return text, attachment 266 return text, attachment