Mercurial > wow > worldplan
diff FlightMap.lua @ 37:78cf1f19856a
WorldPlan:
- Quest pins are now placed on the flight map. Their visibility rules will mirror the filter options from the world map.
- Filter controls polish:
- First click negates other reward type filters. Subsequent clicks will then toggle individual reward types until the filters are reset via Right-click.
- Adheres to the Blizzard CVars added in patch 7.1
- Numerous optimizations to how data and visual updates are handled; should see an even better load time, and snappier world map interaction.
ClassPlan:
- The 'Available Missions' list is now recorded. It can be reviewed by clicking on the mission list heading.
- Information filtering by character and realm.
author | Nenue |
---|---|
date | Fri, 04 Nov 2016 02:47:17 -0400 |
parents | 21bcff08b0f4 |
children | a93cae445d3f |
line wrap: on
line diff
--- a/FlightMap.lua Fri Nov 04 01:40:39 2016 -0400 +++ b/FlightMap.lua Fri Nov 04 02:47:17 2016 -0400 @@ -48,6 +48,15 @@ function WorldPlanDataProvider:OnAdded(mapCanvas) self.activePins = {}; self.owningMap = mapCanvas + self:RegisterEvent('QUEST_LOG_UPDATE') + + -- remove the the blizzard data provider + for frame in pairs(FlightMapFrame.dataProviders) do + if frame.OnAdded == WorldQuestDataProviderMixin.OnAdded then + FlightMapFrame:RemoveDataProvider(frame) + break + end + end end @@ -92,6 +101,7 @@ frame:SetPosition(info.x, info.y) frame.pin = pin + pin.owningFrame = self:GetMap() pin.isStale = true pin:SetParent(frame) pin:ClearAllPoints() @@ -111,19 +121,27 @@ self.activePins[questId] = nil; end --self:GetMap():RemoveAllPinsByTemplate("WorldQuestPinTemplate"); + for pin in self:GetMap():EnumeratePinsByTemplate("WorldQuestPinTemplate") do + pin:Hide() + end end +function WorldPlanDataProvider:OnEvent() + for pin in self:GetMap():EnumeratePinsByTemplate("WorldQuestPinTemplate") do + pin:Hide() + end +end function WorldPlanDataPinMixin:OnShow() print('|cFFFFFF00'..tostring(self:GetName())..':OnShow()|r') end function WorldPlanDataPinMixin:OnMouseEnter () - self.pin:OnEnter() + end function WorldPlanDataPinMixin:OnMouseLeave () - self.pin:OnLeave() + end function WorldPlanDataPinMixin:RemoveAllData()