Mercurial > wow > buffalo2
comparison ObjectiveTracker/QuestTracker.lua @ 24:66b927b46776
Refine the XML data logic, and sort out some EnableMouse inconsistencies.
author | Nenue |
---|---|
date | Mon, 11 Apr 2016 09:07:40 -0400 |
parents | e837384ac363 |
children | 4b3da1b221de |
comparison
equal
deleted
inserted
replaced
23:e837384ac363 | 24:66b927b46776 |
---|---|
4 local GetAutoQuestPopUp, GetQuestLogCompletionText = GetAutoQuestPopUp, GetQuestLogCompletionText | 4 local GetAutoQuestPopUp, GetQuestLogCompletionText = GetAutoQuestPopUp, GetQuestLogCompletionText |
5 local Default, Quest = T.DefaultHandler, T.Quest | 5 local Default, Quest = T.DefaultHandler, T.Quest |
6 local format = format | 6 local format = format |
7 local print = B.print('Tracker') | 7 local print = B.print('Tracker') |
8 local lprint = B.print('Line') | 8 local lprint = B.print('Line') |
9 local iprint = B.print('Info') | |
9 | 10 |
10 local colors = T.colors | 11 local colors = T.colors |
12 | |
13 local tprint = B.print('Tracker') | |
14 Quest.Update = function(self, reason, ...) | |
15 local print = tprint | |
16 print('QuestTracker:Update() received') | |
17 T.UpdateActionButtons() | |
18 Default.Update(self, reason, ...) | |
19 end | |
20 | |
11 Quest.UpdateObjectives = function(handler, block) | 21 Quest.UpdateObjectives = function(handler, block) |
12 local print = lprint | 22 local print = lprint |
13 print('|cFF00FFFFUpdateObjectives()') | 23 print('|cFF00FFFFUpdateObjectives()') |
14 local info = block.info | 24 local info = block.info |
15 | 25 |
38 local completionText | 48 local completionText |
39 if info.isAutoComplete then | 49 if info.isAutoComplete then |
40 local questID, popupType = GetAutoQuestPopUp(info.questLogIndex) | 50 local questID, popupType = GetAutoQuestPopUp(info.questLogIndex) |
41 if popupType == 'COMPLETE' then | 51 if popupType == 'COMPLETE' then |
42 print(' :: auto-complete quest :: set the message') | 52 print(' :: auto-complete quest :: set the message') |
43 info.completionText = CLICK_TO_COMPLETE | 53 info.completionText = T.strings.CLICK_TO_COMPLETE |
44 end | 54 end |
45 end | 55 end |
46 if info.isComplete then | 56 if info.isComplete then |
47 if not completionText or info.completionText then | 57 if not completionText or info.completionText then |
48 info.completionText = GetQuestLogCompletionText(info.questLogIndex) | 58 info.completionText = GetQuestLogCompletionText(info.questLogIndex) |
80 return line | 90 return line |
81 end | 91 end |
82 | 92 |
83 ----------------------------- | 93 ----------------------------- |
84 --- QUEST | 94 --- QUEST |
85 Quest.itemButtons = {} | |
86 Quest.freeButtons = {} | |
87 Quest.POI = {} | 95 Quest.POI = {} |
88 Quest.QuestBlock = {} | 96 Quest.QuestBlock = {} |
89 Quest.LogBlock = {} | 97 Quest.LogBlock = {} |
90 Quest.LogInfo = {} | 98 Quest.LogInfo = {} |
91 | 99 |
94 self.numAll = GetNumQuestLogEntries() | 102 self.numAll = GetNumQuestLogEntries() |
95 self.numWatched = GetNumQuestWatches() | 103 self.numWatched = GetNumQuestWatches() |
96 return self.numWatched, self.numAll | 104 return self.numWatched, self.numAll |
97 end | 105 end |
98 Quest.GetInfo = function (self, watchIndex) | 106 Quest.GetInfo = function (self, watchIndex) |
107 local print = iprint | |
99 print('|cFF00DDFFQuest|r.|cFF0088FFGetInfo(|r'.. tostring(watchIndex)..'|r)') | 108 print('|cFF00DDFFQuest|r.|cFF0088FFGetInfo(|r'.. tostring(watchIndex)..'|r)') |
100 local questID, title, questIndex, numObjectives, requiredMoney, isComplete, | 109 local questID, title, questIndex, numObjectives, requiredMoney, _, |
101 startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(watchIndex) | 110 _, isAutoComplete, failureTime, timeElapsed, questType, _, _, _, _ = GetQuestWatchInfo(watchIndex) |
102 | 111 |
103 if not questIndex then | 112 if not questIndex then |
104 return | 113 return |
105 end | 114 end |
106 | 115 |