Mercurial > wow > buffalo2
comparison ObjectiveInfo.lua @ 2:a2396b03ce63
- identify action buttons by the associated QuestID instead of QuestLogIndex
- deferred button placement in general to a self-destructing OnUpdate
-- and defer self-destruct to a end of combat event if InCombatLockdown
- tracker wrapper has an experience/reputation bar; the two elements "feel" related and it's a very simple info display
author | Nenue |
---|---|
date | Thu, 31 Mar 2016 01:38:47 -0400 |
parents | b0447b382f36 |
children | 3397aae1f44d |
comparison
equal
deleted
inserted
replaced
1:b0447b382f36 | 2:a2396b03ce63 |
---|---|
17 end | 17 end |
18 Quest.GetInfo = function (self, watchIndex) | 18 Quest.GetInfo = function (self, watchIndex) |
19 print('|cFF00DDFFQuest|r.|cFF0088FFGetInfo(|r'.. tostring(watchIndex)..'|r)') | 19 print('|cFF00DDFFQuest|r.|cFF0088FFGetInfo(|r'.. tostring(watchIndex)..'|r)') |
20 local questID, title, questIndex, numObjectives, requiredMoney, isComplete, | 20 local questID, title, questIndex, numObjectives, requiredMoney, isComplete, |
21 startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(watchIndex) | 21 startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(watchIndex) |
22 print(GetQuestWatchInfo(watchIndex)) | |
23 if not questID then | 22 if not questID then |
24 return | 23 return |
25 end | 24 end |
26 print(self.Info) | |
27 self.Info[questID] = self.Info[questID] or {} | 25 self.Info[questID] = self.Info[questID] or {} |
28 | 26 |
29 local q = self.Info[questID] | 27 local q = self.Info[questID] |
30 q.watchIndex = watchIndex | 28 q.watchIndex = watchIndex |
31 q.type = 'Quest' | 29 q.type = 'Quest' |
50 SelectQuestLogEntry(questIndex) | 48 SelectQuestLogEntry(questIndex) |
51 q.greenRange = GetQuestGreenRange() | 49 q.greenRange = GetQuestGreenRange() |
52 q.isDaily = QuestIsDaily() | 50 q.isDaily = QuestIsDaily() |
53 q.isWeekly = QuestIsWeekly() | 51 q.isWeekly = QuestIsWeekly() |
54 ----------------------------------------- | 52 ----------------------------------------- |
55 | |
56 --- End QuestLogEntry calls | 53 --- End QuestLogEntry calls |
57 print(' |cFF0088FF', q.isDaily, q.isWeekly) | |
58 | 54 |
59 q.isComplete = IsQuestComplete(questID) | 55 q.isComplete = IsQuestComplete(questID) |
60 q.isBreadCrumb = IsBreadcrumbQuest(questID) | 56 q.isBreadCrumb = IsBreadcrumbQuest(questID) |
61 q.isStoryQuest = IsStoryQuest(questID) | 57 q.isStoryQuest = IsStoryQuest(questID) |
62 q.completionText= GetQuestLogCompletionText(questIndex) | 58 q.completionText= GetQuestLogCompletionText(questIndex) |
107 } | 103 } |
108 end | 104 end |
109 end | 105 end |
110 | 106 |
111 self.LogInfo[questIndex] = q | 107 self.LogInfo[questIndex] = q |
112 print('|cFF0088FFGetQuestInfo('..questID..')|r', questIndex, title) | 108 print('- logIndex =', questIndex, 'title =', title) |
113 return q | 109 return q |
114 end | 110 end |
115 | 111 |
116 Quest.GetClosest = function() | 112 Quest.GetClosest = function() |
117 local minID | 113 local minID |