Mercurial > wow > worldplan
comparison WorldMap.lua @ 119:b528ba7c239c v7.3.2-20171712
lexical bits
| author | Nenue |
|---|---|
| date | Sun, 17 Dec 2017 18:43:29 -0500 |
| parents | a4dfdd4f1cf3 |
| children |
comparison
equal
deleted
inserted
replaced
| 118:5916b9b8486b | 119:b528ba7c239c |
|---|---|
| 186 end | 186 end |
| 187 end | 187 end |
| 188 end | 188 end |
| 189 | 189 |
| 190 function Module:OnUpdate(sinceLast) | 190 function Module:OnUpdate(sinceLast) |
| 191 if WorldPlanData.DebugEnabled then | |
| 192 if self.refreshBenchMarkTicker then | |
| 193 --print(self.refreshBenchMarkTicker) | |
| 194 self.refreshBenchMarkTicker = self.refreshBenchMarkTicker - 1 | |
| 195 | |
| 196 if self.refreshBenchMarkTicker == 0 then | |
| 197 | |
| 198 self.refreshTime = floor((GetTime() - self.refreshBenchMark) * 1000) | |
| 199 self.debugMessage:SetText(self.refreshTime) | |
| 200 self.refreshBenchMarkTicker = nil | |
| 201 end | |
| 202 else | |
| 203 self.refreshBenchMark = GetTime() | |
| 204 end | |
| 205 end | |
| 206 | 191 |
| 207 if self.filtersDirty or self.isStale then | 192 if self.filtersDirty or self.isStale then |
| 208 self:Refresh() | 193 self:Refresh() |
| 209 end | 194 end |
| 210 | 195 |
| 211 if self.tasksDirty then | |
| 212 self:UpdateTaskPOIs() | |
| 213 end | |
| 214 | 196 |
| 215 | 197 |
| 216 if #db.UpdatedPins >= 1 then | 198 if #db.UpdatedPins >= 1 then |
| 217 --print('|cFF00FF88pending update', #db.UpdatedPins) | 199 --print('|cFF00FF88pending update', #db.UpdatedPins) |
| 218 self:UpdateNext() | 200 self:UpdateNext() |
| 330 end | 312 end |
| 331 | 313 |
| 332 function Module:UpdateTaskPOIs() | 314 function Module:UpdateTaskPOIs() |
| 333 canTargetQuests = SpellCanTargetQuest() | 315 canTargetQuests = SpellCanTargetQuest() |
| 334 | 316 |
| 335 if InCombatLockdown() then | 317 --if InCombatLockdown() then |
| 336 self.tasksDirty = true | 318 self.tasksDirty = true |
| 337 return | 319 -- return |
| 338 end | 320 --end |
| 339 | 321 |
| 340 | 322 |
| 341 for i = 1, NUM_WORLDMAP_TASK_POIS do | 323 for i = 1, NUM_WORLDMAP_TASK_POIS do |
| 342 local poiFrame = _G['WorldMapFrameTaskPOI'..i] | 324 local poiFrame = _G['WorldMapFrameTaskPOI'..i] |
| 343 if poiFrame and poiFrame.worldQuest then | 325 if poiFrame and poiFrame.worldQuest then |
| 348 poiFrame:Hide() | 330 poiFrame:Hide() |
| 349 end | 331 end |
| 350 end | 332 end |
| 351 end | 333 end |
| 352 | 334 |
| 353 self.tasksDirty = false | 335 self.tasksDirty = nil |
| 354 end | 336 end |
| 355 -- re-anchors and scales pins that have had either of these changed due to data loading delays | 337 -- re-anchors and scales pins that have had either of these changed due to data loading delays |
| 356 function Module:UpdateNext() | 338 function Module:UpdateNext() |
| 357 --print('|cFF00FF88UpdateNext()') | 339 --print('|cFF00FF88UpdateNext()') |
| 358 local pin = tremove(db.UpdatedPins) | 340 local pin = tremove(db.UpdatedPins) |
| 581 self:UpdateQuestsForMap(taskInfo, mapAreaID, transformFlags) | 563 self:UpdateQuestsForMap(taskInfo, mapAreaID, transformFlags) |
| 582 end | 564 end |
| 583 end | 565 end |
| 584 end | 566 end |
| 585 | 567 |
| 568 -- Argus inset | |
| 569 | |
| 586 | 570 |
| 587 end | 571 end |
| 588 | 572 |
| 589 -- Attempt to display the pins for quests in taskInfo | 573 -- Attempt to display the pins for quests in taskInfo |
| 590 function Module:UpdateQuestsForMap(taskInfo, mapID, transformFlags) | 574 function Module:UpdateQuestsForMap(taskInfo, mapID, transformFlags) |
| 598 print('layoutDirty =',layoutDirty) | 582 print('layoutDirty =',layoutDirty) |
| 599 | 583 |
| 600 for index, info in pairs(taskInfo) do | 584 for index, info in pairs(taskInfo) do |
| 601 local questID, x, y = info.questId, info.x, info.y | 585 local questID, x, y = info.questId, info.x, info.y |
| 602 | 586 |
| 603 -- rough workaround for argus map; flightmap and world map images are different, so not completely accurate | 587 -- rough workaround for argus continent map that uses a different image |
| 604 if transformFlags and x and y then | 588 if x and y and(db.currentMapID == 1184) then |
| 605 print(x,y) | 589 print(x,y) |
| 606 x = x / 2 + .25 | 590 x = x / 2 + .25 |
| 607 y = y / 2 + .30 | 591 y = y / 2 + .30 |
| 608 print(x,y) | 592 print(x,y) |
| 609 end | 593 end |
