diff WorldPlan.lua @ 93:98b5e08b75ed v1.4.9

- Fixed quest completion checking and handling - Changed animation method to hopefully stop weird flickering. - Pins are now visible before full reward data is loaded - Filter bar redesigned: - aligned horizontally along the top of the map display - filter buttons display a '+' when there are matches in both current and other zones, and '*' when there only matches in other zones - button tooltips separate local and global quests - button categories are highlighted and labeled when the cursor is over them - Fixed invalid POI targets appearing when the spell targeting cursor is active
author Nenue
date Sat, 15 Apr 2017 11:04:54 -0400
parents 78d78dc77822
children b29b35cb8539
line wrap: on
line diff
--- a/WorldPlan.lua	Tue Apr 11 00:44:22 2017 -0400
+++ b/WorldPlan.lua	Sat Apr 15 11:04:54 2017 -0400
@@ -263,10 +263,6 @@
       db.DefaultConfig[frame:GetName()] = frame.defaults
     end
 
-    frame.GetTypeInfo = function(frame, typeID)
-      return self:GetTypeInfo(frame, typeID)
-    end
-
     frame.owningFrame = self
   else
 
@@ -351,26 +347,14 @@
 
   local mapFileName, textureHeight, textureWidth, isMicroDungeon, microDungeonMapName = GetMapInfo()
 
-
-  if db.isContinentMap ~= isContinent then
-    for _, pin in pairs(db.QuestsByID) do
-       pin.isStale = true
-    end
-  end
   local isMapOpen = WorldMapFrame:IsShown()
-  if not isMapOpen then
-    return
-  end
-
-  local isNewMap = (mapAreaID ~= db.currentMapID) or (isMapOpen ~= db.isMapOpen) or (db.isMicroDungeon ~= isMicroDungeon)
-
+  local isNewMap = (mapAreaID ~= db.currentMapID) or (isMapOpen ~= db.isMapOpen) or (db.isMicroDungeon ~= isMicroDungeon) or (db.isContinentMap ~= isContinent)
 
   db.isMicroDungeon = isMicroDungeon
   db.isMapOpen = isMapOpen
   db.currentMapID = mapAreaID
   db.isContinentMap = isContinent
   db.isBrokenIsle = isBrokenIsle
-  db.useContinentType = (WorldMapDetailFrame:GetScale() < 1)
 
   for _, module in ipairs(db.OrderedModules) do
     if module.OnMapInfo then
@@ -394,6 +378,14 @@
   else
     if (event == 'WORLD_MAP_UPDATE') or (event == 'PLAYER_ENTERING_WORLD') or (event == 'PLAYER_LOGIN') then
       print('|cFFFF4400currentMapID =', db.currentMapID, ...)
+      if event == 'PLAYER_ENTERING_WORLD' then
+        -- start from scratch
+        db.isMicroDungeon = nil
+        db.isMapOpen = nil
+        db.currentMapID = nil
+        db.isContinentMap = nil
+        db.isBrokenIsle = nil
+      end
 
 
       self:SetCurrentMap(event .. ' ' .. GetTime())