diff QuestPOI.lua @ 8:802abb8a10ea

Fixed loss of mission progress data while changing zones by using `GARRISON_LANDINGPAGE_SHIPMENTS' as the trigger point for mission scoops. * `MISSION_LIST_UPDATE' fires before all data is available, and if this is happens on a loading screen, then several landing page items may get snipped.
author Nenue
date Sun, 23 Oct 2016 07:19:53 -0400
parents 34d9fbf7af20
children a2b623043970
line wrap: on
line diff
--- a/QuestPOI.lua	Sat Oct 22 15:36:25 2016 -0400
+++ b/QuestPOI.lua	Sun Oct 23 07:19:53 2016 -0400
@@ -209,4 +209,36 @@
   else
     self.MouseGlow:Hide()
   end
+end
+
+
+function WorldPlanFilterPinMixin:OnEnter ()
+  local filter = WorldPlan.FilterOptions[self:GetID()]
+  local mapID = GetCurrentMapAreaID()
+  local quests = (mapID == WorldPlan.BrokenIsleID) and WorldPlan.QuestsByID or WorldPlan.QuestsByZone[mapID]
+  if quests then
+    GameTooltip:SetOwner(self, 'ANCHOR_RIGHT')
+    GameTooltip:AddLine(filter.label)
+    local filterKey = self.filterKey
+    local filterValue = self.filterValue
+    if filterKey then
+      for questID, pin in pairs(quests) do
+        if pin.used and not pin.filtered then
+          if  pin[filterKey] == filterValue then
+            local style = pin.style or WorldPlan.FilterStyle
+
+            if familiars[questID] then
+              GameTooltip:AddLine(pin.title,0,1,0)
+            else
+              GameTooltip:AddLine(pin.title,1,1,1)
+            end
+
+          end
+        end
+      end
+    else
+      GameTooltip:AddLine('Reset all filters')
+    end
+    GameTooltip:Show()
+  end
 end
\ No newline at end of file