Mercurial > wow > worldplan
comparison WorldPlan.lua @ 75:78d78dc77822
update conditional tweaks
author | Nenue |
---|---|
date | Mon, 10 Apr 2017 07:13:29 -0400 |
parents | 6db0b9696936 |
children | 98b5e08b75ed |
comparison
equal
deleted
inserted
replaced
74:2ba11b25aa7f | 75:78d78dc77822 |
---|---|
30 db.TasksByID = {} | 30 db.TasksByID = {} |
31 db.FreePins = {} | 31 db.FreePins = {} |
32 db.UsedPins = {} | 32 db.UsedPins = {} |
33 db.UpdatedPins = {} | 33 db.UpdatedPins = {} |
34 db.ReportChunks = {} | 34 db.ReportChunks = {} |
35 db.Bounties = {} | |
36 db.BountiesByQuestID = {} | |
35 db.BountiesByFactionID = {} | 37 db.BountiesByFactionID = {} |
36 | 38 |
37 -- default color templates | 39 -- default color templates |
38 db.DefaultType = { | 40 db.DefaultType = { |
39 a = 1, | 41 a = 1, |
354 for _, pin in pairs(db.QuestsByID) do | 356 for _, pin in pairs(db.QuestsByID) do |
355 pin.isStale = true | 357 pin.isStale = true |
356 end | 358 end |
357 end | 359 end |
358 local isMapOpen = WorldMapFrame:IsShown() | 360 local isMapOpen = WorldMapFrame:IsShown() |
359 local isNewMap = isMapOpen and ((mapAreaID ~= db.currentMapID) or (isMapOpen ~= db.isMapOpen) or (db.isMicroDungeon ~= isMicroDungeon)) | 361 if not isMapOpen then |
362 return | |
363 end | |
364 | |
365 local isNewMap = (mapAreaID ~= db.currentMapID) or (isMapOpen ~= db.isMapOpen) or (db.isMicroDungeon ~= isMicroDungeon) | |
366 | |
360 | 367 |
361 db.isMicroDungeon = isMicroDungeon | 368 db.isMicroDungeon = isMicroDungeon |
362 db.isMapOpen = isMapOpen | 369 db.isMapOpen = isMapOpen |
363 db.currentMapID = mapAreaID | 370 db.currentMapID = mapAreaID |
364 db.isContinentMap = isContinent | 371 db.isContinentMap = isContinent |
365 db.isBrokenIsle = isBrokenIsle | 372 db.isBrokenIsle = isBrokenIsle |
366 db.useContinentType = (WorldMapDetailFrame:GetScale() < 1) | 373 db.useContinentType = (WorldMapDetailFrame:GetScale() < 1) |
367 | 374 |
368 for _, module in ipairs(db.OrderedModules) do | 375 for _, module in ipairs(db.OrderedModules) do |
369 if module.OnMapInfo then | 376 if module.OnMapInfo then |
377 if module.Debug then | |
378 module:Debug(event) | |
379 end | |
370 print(' |cFF00FFFF'..module:GetName() .. ':OnMapInfo()|r') | 380 print(' |cFF00FFFF'..module:GetName() .. ':OnMapInfo()|r') |
371 module:OnMapInfo(isBrokenIsle, isContinent, mapAreaID, isNewMap, isMapOpen) | 381 module:OnMapInfo(isBrokenIsle, isContinent, mapAreaID, isNewMap, isMapOpen) |
372 end | 382 end |
373 end | 383 end |
374 end | 384 end |
384 else | 394 else |
385 if (event == 'WORLD_MAP_UPDATE') or (event == 'PLAYER_ENTERING_WORLD') or (event == 'PLAYER_LOGIN') then | 395 if (event == 'WORLD_MAP_UPDATE') or (event == 'PLAYER_ENTERING_WORLD') or (event == 'PLAYER_LOGIN') then |
386 print('|cFFFF4400currentMapID =', db.currentMapID, ...) | 396 print('|cFFFF4400currentMapID =', db.currentMapID, ...) |
387 | 397 |
388 | 398 |
389 self:SetCurrentMap(event) | 399 self:SetCurrentMap(event .. ' ' .. GetTime()) |
390 end | 400 end |
391 end | 401 end |
392 end | 402 end |
393 | 403 |
394 function WorldPlanCore:OnNext(func) | 404 function WorldPlanCore:OnNext(func) |
637 end | 647 end |
638 | 648 |
639 for i, module in ipairs(db.OrderedModules) do | 649 for i, module in ipairs(db.OrderedModules) do |
640 if module.Refresh then | 650 if module.Refresh then |
641 print('|cFF00FF00external '..module:GetName()..':Refresh()|r') | 651 print('|cFF00FF00external '..module:GetName()..':Refresh()|r') |
642 module:Refresh(forced) | 652 module:Refresh('WORLDPLAN_REFRESH') |
643 end | 653 end |
644 end | 654 end |
645 | 655 |
646 self.isStale = nil | 656 self.isStale = nil |
647 end | 657 end |