diff WorldMap.lua @ 117:a4dfdd4f1cf3 v7.3.2-20171215

- Fixed filter pins not working on Argus maps - More taint counter-measures
author Nenue
date Fri, 15 Dec 2017 16:38:09 -0500
parents e8b6c5433128
children b528ba7c239c
line wrap: on
line diff
--- a/WorldMap.lua	Fri Nov 24 23:51:44 2017 -0500
+++ b/WorldMap.lua	Fri Dec 15 16:38:09 2017 -0500
@@ -35,8 +35,28 @@
 
 local ToggleButton = {}
 local BROKEN_ISLES_ID, DALARAN_ID, AZSUNA_ID, VALSHARAH_ID, HIGHMOUNTAIN_ID, STORMHEIM_ID, SURAMAR_ID, EOA_ID = 1007, 1014, 1015,1018, 1024, 1017, 1033, 1096
-local WORLD_QUEST_MAPS = { [DALARAN_ID] = 'Dalaran70',  [AZSUNA_ID] = 'Azsuna',  [VALSHARAH_ID] = "Val'sharah",
-  [HIGHMOUNTAIN_ID] = 'Highmountain', [STORMHEIM_ID] = 'Stormheim',  [SURAMAR_ID] = 'Suramar',  [EOA_ID] = 'EyeOfAszhara', }
+local ARGUS_ID, ANTORAN_ID, KROKUUN_ID, MACAREE_ID = 1184, 1171, 1135, 1170
+local WORLD_QUEST_MAPS = {
+  [DALARAN_ID] = true,
+  [AZSUNA_ID] = true,
+  [VALSHARAH_ID] = true,
+  [HIGHMOUNTAIN_ID] = true,
+  [STORMHEIM_ID] = true,
+  [SURAMAR_ID] = true,
+  [EOA_ID] = true,
+  [ARGUS_ID] = true,
+  [ANTORAN_ID] = true,
+  [KROKUUN_ID] = true,
+  [MACAREE_ID] = true
+}
+
+local SUBCONTINENT_MAPS = {
+    [ANTORAN_ID] = ARGUS_ID,
+    [KROKUUN_ID] = ARGUS_ID,
+    [MACAREE_ID] = ARGUS_ID,
+}
+
+
 
 local REWARD_CASH = WORLD_QUEST_REWARD_TYPE_FLAG_GOLD
 local REWARD_ARTIFACT_POWER = WORLD_QUEST_REWARD_TYPE_FLAG_ARTIFACT_POWER
@@ -188,6 +208,11 @@
     self:Refresh()
   end
 
+  if self.tasksDirty then
+    self:UpdateTaskPOIs()
+  end
+
+
   if #db.UpdatedPins >= 1 then
     --print('|cFF00FF88pending update', #db.UpdatedPins)
     self:UpdateNext()
@@ -306,6 +331,13 @@
 
 function Module:UpdateTaskPOIs()
   canTargetQuests = SpellCanTargetQuest()
+
+  if InCombatLockdown() then
+    self.tasksDirty = true
+    return
+  end
+
+
   for i = 1, NUM_WORLDMAP_TASK_POIS do
     local poiFrame = _G['WorldMapFrameTaskPOI'..i]
     if poiFrame and poiFrame.worldQuest then
@@ -317,6 +349,8 @@
       end
     end
   end
+
+  self.tasksDirty = false
 end
 -- re-anchors and scales pins that have had either of these changed due to data loading delays
 function Module:UpdateNext()
@@ -589,6 +623,13 @@
         if db.QuestsByZone[mapID] then
           db.QuestsByZone[mapID][questID] = pin
         end
+
+        if SUBCONTINENT_MAPS[mapID] then
+          db.QuestsByZone[SUBCONTINENT_MAPS[mapID]] = db.QuestsByZone[SUBCONTINENT_MAPS[mapID]] or {}
+          db.QuestsByZone[SUBCONTINENT_MAPS[mapID]][questID] = pin
+        end
+
+
       else
         print('|cFFFF4400discarding|r', pin.title)
       end