Mercurial > wow > worldplan
comparison WorldPlan.lua @ 68:cce68795f955
- microDungeon status should trigger a full update
author | Nenue |
---|---|
date | Sun, 02 Apr 2017 13:51:24 -0400 |
parents | 96183f981acb |
children | 31de7e9e7849 |
comparison
equal
deleted
inserted
replaced
67:96183f981acb | 68:cce68795f955 |
---|---|
293 [1072] = true, -- True Shot Lodge, | 293 [1072] = true, -- True Shot Lodge, |
294 | 294 |
295 } | 295 } |
296 | 296 |
297 function WorldPlanCore:SetCurrentMap(event) | 297 function WorldPlanCore:SetCurrentMap(event) |
298 local mapAreaID = GetCurrentMapAreaID() | 298 local mapAreaID, isContinent = GetCurrentMapAreaID() |
299 if not mapAreaID then | 299 if not mapAreaID then |
300 return | 300 return |
301 end | 301 end |
302 print('SetCurrentMap()', event, mapAreaID) | 302 print('SetCurrentMap()', event, mapAreaID) |
303 local isBrokenIsle = BROKEN_ISLE_MAPS[mapAreaID] | 303 local isBrokenIsle = BROKEN_ISLE_MAPS[mapAreaID] |
304 local isContinent = (mapAreaID == BROKEN_ISLES_ID) | 304 |
305 local mapFileName, textureHeight, textureWidth, isMicroDungeon, microDungeonMapName = GetMapInfo() | |
305 | 306 |
306 | 307 |
307 if db.isContinentMap ~= isContinent then | 308 if db.isContinentMap ~= isContinent then |
308 for _, pin in pairs(db.QuestsByID) do | 309 for _, pin in pairs(db.QuestsByID) do |
309 pin.isStale = true | 310 pin.isStale = true |
310 end | 311 end |
311 end | 312 end |
312 local isMapOpen = WorldMapFrame:IsShown() | 313 local isMapOpen = WorldMapFrame:IsShown() |
313 local isNewMap = isMapOpen and (mapAreaID ~= db.currentMapID) | 314 local isNewMap = isMapOpen and ((mapAreaID ~= db.currentMapID) or (isMapOpen ~= db.isMapOpen) or (db.isMicroDungeon ~= isMicroDungeon)) |
315 | |
316 db.isMicroDungeon = isMicroDungeon | |
317 db.isMapOpen = isMapOpen | |
314 db.currentMapID = mapAreaID | 318 db.currentMapID = mapAreaID |
315 db.isContinentMap = isContinent | 319 db.isContinentMap = isContinent |
316 db.isBrokenIsle = isBrokenIsle | 320 db.isBrokenIsle = isBrokenIsle |
317 db.useContinentType = (WorldMapDetailFrame:GetScale() < 1) | 321 db.useContinentType = (WorldMapDetailFrame:GetScale() < 1) |
318 | |
319 | 322 |
320 for _, module in ipairs(db.OrderedModules) do | 323 for _, module in ipairs(db.OrderedModules) do |
321 if module.OnMapInfo then | 324 if module.OnMapInfo then |
322 print(' |cFF00FFFF'..module:GetName() .. ':OnMapInfo()|r') | 325 print(' |cFF00FFFF'..module:GetName() .. ':OnMapInfo()|r') |
323 module:OnMapInfo(isBrokenIsle, isContinent, mapAreaID, isNewMap, isMapOpen) | 326 module:OnMapInfo(isBrokenIsle, isContinent, mapAreaID, isNewMap, isMapOpen) |