diff QuestPOI.lua @ 96:8591401ec278

- Fixed quest markers for other maps becoming visible due to ambiguous interpretations of pin.used. - Removed some redundant filter checking calls on pins obtained through Acquire()
author Nenue
date Sun, 14 May 2017 23:45:08 -0400
parents b29b35cb8539
children d594c5c4a4a3
line wrap: on
line diff
--- a/QuestPOI.lua	Mon May 08 22:38:52 2017 -0400
+++ b/QuestPOI.lua	Sun May 14 23:45:08 2017 -0400
@@ -24,6 +24,7 @@
 local SpellCanTargetQuest, GetCVarBool = SpellCanTargetQuest, GetCVarBool
 local SetSuperTrackedQuestID = SetSuperTrackedQuestID
 local HaveQuestRewardData = HaveQuestRewardData
+local GetTime = GetTime
 
 
 local pairs, ipairs, tinsert, tremove, unpack, select = pairs, ipairs, tinsert, tremove, unpack, select
@@ -429,6 +430,8 @@
   WorldMapTooltip:Hide();
 end
 
+
+
 local updateTime, markTime
 function QuestPOI:OnUpdate (sinceLast)
   -- control update check intervals
@@ -441,9 +444,7 @@
 
     local alpha = self.icon:GetAlpha()
     local alphaMod = ((GetTime()-self.alphaStart) *FADE_TIMING_MULTIPLIER)
-    if self:GetID() == 1 then
-    print(alpha, self.toAlpha, sinceLast, alphaMod)
-    end
+
     if alpha > self.toAlpha then
       alpha = alpha - (sinceLast*FADE_TIMING_MULTIPLIER)
 
@@ -516,6 +517,12 @@
   if self.maxAlertLevel then
     self:UpdateStatus()
   end
+
+
+  if self.isStale then
+    self:Refresh()
+  end
+
 end
 
 
@@ -859,6 +866,9 @@
 function QuestPOI:CheckFilterRules ()
   local print = qprint
   local qType = self.worldQuestType
+
+  self.canShow = false
+
   if not TQ_IsActive(self.questID) then
     self.hideReason = 'Filter check ended because quest is inactive.'
     self.used = nil
@@ -896,9 +906,8 @@
     self.isStale = true
   end
 
+  self.canShow = true
   self.filtered = filtered
-  self.used = true
-  self:SetShown(true)
 end
 
 function QuestPOI:Refresh (event)