changeset 98:d594c5c4a4a3 v1.4.10

- 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() - Attempted fix to a source of combat taint. - Attempt to fix quest markers not disappearing immediately after a completion spell is used.
author Nenue
date Mon, 15 May 2017 00:15:13 -0400
parents 5d90d09cb7b7
children cffecc347e90
files QuestPOI.lua WorldQuests.lua
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/QuestPOI.lua	Sun May 14 23:54:38 2017 -0400
+++ b/QuestPOI.lua	Mon May 15 00:15:13 2017 -0400
@@ -1117,10 +1117,12 @@
   self.timeLabel:SetShown(isShown)
 end
 
-function QuestPOI:Release()
+function QuestPOI:Release(msg)
   print('|cFFFF4400'..self:GetID()..':Release()', self.hideReason)
-  self.hideReason = 'Released by script.'
+  self.hideReason = msg or 'Released by script.'
+  self:SetShown(false)
   self:HideOrShowFrames(false)
+
   if self.questID then
     db.QuestsByID[self.questID] = nil
     for _, map in pairs(db.QuestsByZone) do
@@ -1136,7 +1138,6 @@
   self.itemTexture = nil
   self.itemName = nil
   self.itemNumber = nil
-  self:SetShown(false)
   self.animating = nil
   self.icon:SetAlpha(0)
   self.RewardBorder:SetAlpha(0)
--- a/WorldQuests.lua	Sun May 14 23:54:38 2017 -0400
+++ b/WorldQuests.lua	Mon May 15 00:15:13 2017 -0400
@@ -218,6 +218,7 @@
   -- calling this implies that the pin is used in some way
   if pin then
     pin:CheckFilterRules()
+    pin.isStale = true
   end
 end
 
@@ -282,7 +283,7 @@
 end
 
 function Module:OnSecureHook(callbackName, func, ...)
-  --rprint('|cFFFF4400'..callbackName..'|r', ...)
+  print('|cFFFF4400'..callbackName..'|r', ...)
   func(self, ...)
 end
 
@@ -555,7 +556,7 @@
         db.QuestsByZone[mapID][questID] = pin
       end
     else
-      print('|cFFFF4400not using|r', pin.title)
+      print('|cFFFF4400discarding|r', pin.title)
     end
   end
 end