comparison ObjectiveTracker/Events.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 9856ebc63fa4
children 1f8f9cc3d956
comparison
equal deleted inserted replaced
36:a487841050be 37:e84d645c8ab8
24 end 24 end
25 25
26 local Quest = T.Quest 26 local Quest = T.Quest
27 T.RemoveQuestWatch = function(questIndex, ...) 27 T.RemoveQuestWatch = function(questIndex, ...)
28 print('|cFFFF8800RemoveQuestWatch', questIndex, ...) 28 print('|cFFFF8800RemoveQuestWatch', questIndex, ...)
29 local block = T.Quest.LogBlock[questIndex] 29
30 if block then 30 --return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST
31 block:Hide()
32 end
33 return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST
34 end 31 end
35 32
36 T.AddTrackedAchievement = function(cheevID) 33 T.AddTrackedAchievement = function(cheevID)
37 T.CleanWidgets() 34 T.CleanWidgets()
38 return OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT 35 --return OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT
39 end 36 end
40 37
41 38
42 T.RemoveTrackedAchievement = function(cheevID) 39 T.RemoveTrackedAchievement = function(cheevID)
43 T.CleanWidgets() 40 T.CleanWidgets()
44 return OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT 41 --return OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT
45 end 42 end
46 43
47 T.AcceptQuest = function() 44 T.AcceptQuest = function()
48 end 45 end
49 46
55 local questID = GetQuestID() 52 local questID = GetQuestID()
56 if T.Quest.Info[questID] then 53 if T.Quest.Info[questID] then
57 local q = T.Quest.Info[questID] 54 local q = T.Quest.Info[questID]
58 if q.logIndex then 55 if q.logIndex then
59 local block = T.Quest.LogBlock[q.logIndex] 56 local block = T.Quest.LogBlock[q.logIndex]
60 if block and block.id == questID then 57 if block then
61 block:Hide() 58 block:Hide()
62 end 59 end
63 end 60 end
64 end 61 end
65 62