# HG changeset patch # User Nenue # Date 1478242037 14400 # Node ID 78cf1f19856ac6aa6cbdb1e22d3e247f81953b72 # Parent 21bcff08b0f4b55a8326ef9316a0346b33792e75 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. diff -r 21bcff08b0f4 -r 78cf1f19856a FlightMap.lua --- 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() diff -r 21bcff08b0f4 -r 78cf1f19856a QuestPOI.lua --- a/QuestPOI.lua Fri Nov 04 01:40:39 2016 -0400 +++ b/QuestPOI.lua Fri Nov 04 02:47:17 2016 -0400 @@ -167,14 +167,16 @@ end function WorldPlanPOIMixin:OnEnter() - if not WorldMapFrame:IsVisible() then - WorldMap_HijackTooltip(self) + if WorldMapFrame:IsVisible() then + WorldMapTooltip:SetOwner(self, 'ANCHOR_RIGHT') + else + WorldMap_HijackTooltip(self.owningFrame) end local completed = select(4,GetAchievementInfo(familiars_id)) if not completed then if self.worldQuestType == LE_QUEST_TAG_TYPE_PET_BATTLE and familiars[self.questID] then - WorldMapTooltip:SetOwner(self, 'ANCHOR_RIGHT') + WorldMapTooltip:AddLine(self.title, 1, 1, 1) if self.quality then local c = ITEM_QUALITY_COLORS[self.quality] diff -r 21bcff08b0f4 -r 78cf1f19856a WorldQuests.lua --- a/WorldQuests.lua Fri Nov 04 01:40:39 2016 -0400 +++ b/WorldQuests.lua Fri Nov 04 02:47:17 2016 -0400 @@ -16,7 +16,7 @@ local mprint = DEVIAN_WORKSPACE and function(...) _G.print('Canvas', ...) end or function() end -local PinBaseIndex = 1600 +local PinBaseIndex = 1000 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', }