Mercurial > wow > worldplan
comparison WorldPlan.lua @ 34:0100d923d8c3
WorldPlan:
- Reward filter toggle changed to clear out other reward filters. The assumption being that one is most often looking only for that particular type of quest when they go to use it.
- Fixed filter bar info falling out of sync after player-triggered world map updates.
- Code stuff:
-- Quest pin shown-state management makes better use of OnShow OnHide handlers, SetShown is toggled and it all goes from there
-- WorldQuests module re-factored outside of the top level frame script.
ClassPlan:
- Available missions are now recorded; the mission list can be toggled between in-progress and available by clicking the heading.
author | Nenue |
---|---|
date | Wed, 02 Nov 2016 19:04:47 -0400 |
parents | be4db60219ca |
children | 26dfa661daa7 |
comparison
equal
deleted
inserted
replaced
33:be4db60219ca | 34:0100d923d8c3 |
---|---|
64 ShowAllProfessionQuests = false, | 64 ShowAllProfessionQuests = false, |
65 DisplayContinentSummary = true, | 65 DisplayContinentSummary = true, |
66 DisplayContinentPins = true, | 66 DisplayContinentPins = true, |
67 NotifyWhenNewQuests = true, | 67 NotifyWhenNewQuests = true, |
68 EnablePins = true, | 68 EnablePins = true, |
69 FadeWhileGrouped = true, | 69 FadeWhileGrouped = false, |
70 } | 70 } |
71 | 71 |
72 -- operating flags | 72 -- operating flags |
73 local superTrackedID | 73 local superTrackedID |
74 local currentMapName | 74 local currentMapName |
156 function WorldPlan:OnShow() | 156 function WorldPlan:OnShow() |
157 print(self:GetName()..':OnShow()') | 157 print(self:GetName()..':OnShow()') |
158 if self.isStale then | 158 if self.isStale then |
159 self:Refresh() | 159 self:Refresh() |
160 end | 160 end |
161 | |
162 hooksecurefunc(self, 'SetScript', function(...) self:print('|cFFFFFF00'..self:GetName()..':SetScript()|r', ...) end) | |
161 end | 163 end |
162 | 164 |
163 function WorldPlan:OnEvent (event, ...) | 165 function WorldPlan:OnEvent (event, ...) |
164 print() | 166 print() |
165 print(event, 'init:', self.initialized) | 167 print(event, 'init:', self.initialized) |
175 end | 177 end |
176 else | 178 else |
177 if event == 'WORLD_MAP_UPDATE' then | 179 if event == 'WORLD_MAP_UPDATE' then |
178 self.currentMapID = GetCurrentMapAreaID() | 180 self.currentMapID = GetCurrentMapAreaID() |
179 self.isContinentMap = (self.currentMapID == BROKEN_ISLES_ID) | 181 self.isContinentMap = (self.currentMapID == BROKEN_ISLES_ID) |
180 print('|cFFFF4400currentMapID =', self.currentMapID) | 182 self:print('|cFFFF4400currentMapID =', self.currentMapID) |
181 --self.isStale = true | 183 --self.isStale = true |
182 end | 184 end |
183 | 185 |
184 for i, module in ipairs(self.modules) do | 186 for i, module in ipairs(self.modules) do |
185 if module.OnEvent then | 187 if module.OnEvent then |
189 end | 191 end |
190 end | 192 end |
191 end | 193 end |
192 | 194 |
193 function WorldPlanCore:OnNext(func) | 195 function WorldPlanCore:OnNext(func) |
196 | |
197 | |
194 tinsert(self.TaskQueue, func) | 198 tinsert(self.TaskQueue, func) |
199 self:print('|cFF00FF00adding scheduled task #', #self.TaskQueue) | |
195 end | 200 end |
196 | 201 |
197 function WorldPlanCore:OnUpdate() | 202 function WorldPlanCore:OnUpdate() |
198 if #self.TaskQueue >= 1 then | 203 if #self.TaskQueue >= 1 then |
199 local func = tremove(self.TaskQueue, 1) | 204 local func = tremove(self.TaskQueue, 1) |
200 if func then | 205 --self:print('|cFF00FF00running scheduled task #', #self.TaskQueue) |
201 func() | 206 func() |
202 end | |
203 | |
204 end | 207 end |
205 | 208 |
206 if self.isStale then | 209 if self.isStale then |
207 print('|cFF00FF00pushing global update') | 210 print('|cFF00FF00pushing global update') |
208 self.isStale = nil | 211 self.isStale = nil |
399 info.text = "Fade In Groups" | 402 info.text = "Fade In Groups" |
400 info.isNotRadio = true | 403 info.isNotRadio = true |
401 info.value = "FadeWhileGrouped" | 404 info.value = "FadeWhileGrouped" |
402 info.tooltipTitle = "Group Fade" | 405 info.tooltipTitle = "Group Fade" |
403 info.tooltipText = "Reduce pin alpha when grouped, so player dots are easier to see." | 406 info.tooltipText = "Reduce pin alpha when grouped, so player dots are easier to see." |
404 info.checked = db.DisplayContinentSummary | 407 info.checked = db.FadeWhileGrouped |
405 info.func = DropDown_OnClick | 408 info.func = DropDown_OnClick |
406 UIDropDownMenu_AddButton(info) | 409 UIDropDownMenu_AddButton(info) |
407 end | 410 end |
408 | 411 |
409 -------------------------------------------------------------------------------------------------------------------- | 412 -------------------------------------------------------------------------------------------------------------------- |