# HG changeset patch # User Nenue # Date 1483491856 18000 # Node ID 0749e38081e70904802bf132f103d68eb41dabdd # Parent 6a2e8583621900cd36831e790f9536be0268f146 - More fixes for map updates from non-Legion zones. diff -r 6a2e85836219 -r 0749e38081e7 FlightMap.lua --- a/FlightMap.lua Sat Dec 31 17:48:25 2016 -0500 +++ b/FlightMap.lua Tue Jan 03 20:04:16 2017 -0500 @@ -114,6 +114,7 @@ frame.pin = pin -- sticking it onto the MapCanvas pin + pin.owningFrame = frame:GetMap() pin.throttle = 1 pin.isStale = true pin:SetAnchor(frame) diff -r 6a2e85836219 -r 0749e38081e7 QuestPOI.lua --- a/QuestPOI.lua Sat Dec 31 17:48:25 2016 -0500 +++ b/QuestPOI.lua Tue Jan 03 20:04:16 2017 -0500 @@ -28,6 +28,9 @@ local dprint = DEVIAN_WORKSPACE and function(...) _G.print('WQData', ...) end or function() end local QuestPOI = WorldPlanPOIMixin +local pinBaseIndex = 1300 +local overlayBaseIndex = 1350 +local previousHighlight local PIN_REFRESH_DELAY = .5 local PIN_REQUEST_DELAY = .1 @@ -188,11 +191,21 @@ local GetFactionInfoByID, GetQuestObjectiveInfo = GetFactionInfoByID, GetQuestObjectiveInfo function QuestPOI:OnEnter() - if not WorldMapFrame:IsVisible() then - end + WorldMap_HijackTooltip(self.owningFrame); if self.filtered then return end + self:SetFrameLevel(pinBaseIndex+100) + self.Overlay:SetFrameLevel(pinBaseIndex+101) + + if previousHighlight then + previousHighlight:SetFrameLevel(pinBaseIndex+previousHighlight:GetID()) + previousHighlight.Overlay:SetFrameLevel(overlayBaseIndex+previousHighlight:GetID()) + end + + previousHighlight = self + + WorldMapTooltip:SetOwner(self, "ANCHOR_RIGHT"); --print('doing tooltip stuff') @@ -422,12 +435,11 @@ self.Overlay:SetShown(false) end -local overlayBaseIndex = 1300 function QuestPOI:SetAnchor(owner, dX, dY, mapWidth, mapHeight) wqprint(self:GetName()..':SetAnchor', self.filtered, self.used) self:SetParent(owner) self:ClearAllPoints() - self:SetFrameLevel(overlayBaseIndex + self:GetID()) + self:SetFrameLevel(pinBaseIndex + self:GetID()) self.Overlay:SetParent(owner) self.Overlay:SetFrameLevel(overlayBaseIndex + self:GetID()) if (dX and dY) then @@ -694,6 +706,7 @@ local iconTexture = self.itemTexture + self:SetSize(highlightWidth, highlightWidth) if self.questID == GetSuperTrackedQuestID() then highlightWidth = highlightWidth + 2 end @@ -702,7 +715,6 @@ highlightWidth = highlightWidth + self.rarity end self.tagIcon:SetSize(self.tagSize, self.tagSize) - self:SetSize(iconWidth, iconWidth) icon:SetSize(iconWidth, iconWidth) iconBorder:SetSize(borderWidth, borderWidth) trackingBorder:SetSize(highlightWidth, highlightWidth) diff -r 6a2e85836219 -r 0749e38081e7 WorldPlan.lua --- a/WorldPlan.lua Sat Dec 31 17:48:25 2016 -0500 +++ b/WorldPlan.lua Tue Jan 03 20:04:16 2017 -0500 @@ -287,9 +287,13 @@ function WorldPlanCore:SetCurrentMap() local mapAreaID = GetCurrentMapAreaID() + if not mapAreaID then + return + end + print(mapAreaID) local isBrokenIsle = BROKEN_ISLE_MAPS[mapAreaID] + local isContinent = (mapAreaID == BROKEN_ISLES_ID) - local isContinent = (mapAreaID == BROKEN_ISLES_ID) db.currentMapID = mapAreaID db.isContinentMap = isContinent db.useContinentType = (WorldMapDetailFrame:GetScale() < 1) diff -r 6a2e85836219 -r 0749e38081e7 WorldPlan.xml --- a/WorldPlan.xml Sat Dec 31 17:48:25 2016 -0500 +++ b/WorldPlan.xml Tue Jan 03 20:04:16 2017 -0500 @@ -56,12 +56,6 @@ - @@ -80,6 +74,12 @@ + diff -r 6a2e85836219 -r 0749e38081e7 WorldQuests.lua --- a/WorldQuests.lua Sat Dec 31 17:48:25 2016 -0500 +++ b/WorldQuests.lua Tue Jan 03 20:04:16 2017 -0500 @@ -59,10 +59,9 @@ end hooksecurefunc("ClickWorldMapActionButton", function () self:OnClickWorldMapActionButton() end) - hooksecurefunc("WorldMapScrollFrame_ReanchorQuestPOIs", function () self:Refresh() end) + hooksecurefunc("WorldMapScrollFrame_ReanchorQuestPOIs", InternalDoRefresh) hooksecurefunc("WorldMap_UpdateQuestBonusObjectives", function () self:OnUpdateQuestBonusObjectives() end) - - + hooksecurefunc("WorldMapFrame_UpdateMap", InternalDoRefresh) WorldMapFrame.UIElementsFrame.BountyBoard:SetSelectedBountyChangedCallback(InternalDoRefresh); WorldMapFrame.UIElementsFrame.ActionButton:SetOnCastChangedCallback(InternalDoRefresh); end @@ -133,12 +132,16 @@ self:RegisterEvent('SKILL_LINES_CHANGED') end -function Module:OnMapInfo(isBrokenIsle, isContinent, mapAreaID) +function Module:OnMapInfo(isBrokenIsle, isZoomedOut, mapAreaID) print('|cFFFFFF00'..self:GetName()..':OnMapInfo()|r visible =', self:IsVisible()) - if self.isContinent ~= isContinent then + if self.isZoomedOut ~= isZoomedOut then self.sizesDirty = true end - self.isContinent = isContinent + + self.isZoomedOut = isZoomedOut + self.isWorldQuestMap = isBrokenIsle + self.currentMapID = mapAreaID + if self:IsVisible() then self:Refresh(true) else @@ -471,6 +474,7 @@ pin.x = x pin.y = y pin:SetFrameLevel(PinBaseIndex+pin:GetID()) + pin.owningFrame = self.hostFrame pin:SetAnchor(self.hostFrame, pin.x, pin.y, self.hostWidth, self.hostHeight) --tinsert(self.UsedPositions, pin) end @@ -511,15 +515,15 @@ end numPins = 0 - local taskInfo = TQ_GetQuestsForPlayerByMapID(db.currentMapID) + local taskInfo = TQ_GetQuestsForPlayerByMapID(self.currentMapID) if taskInfo then - self:UpdateMap(taskInfo, db.currentMapID) + self:UpdateMap(taskInfo, self.currentMapID) end - local numZones = MC_GetNumZones(db.currentMapID) + local numZones = MC_GetNumZones(self.currentMapID) if numZones then for i = 1, numZones do local mapAreaID = MC_GetZoneInfo(self.currentMapID, i) - local taskInfo = TQ_GetQuestsForPlayerByMapID(mapAreaID, db.currentMapID) + local taskInfo = TQ_GetQuestsForPlayerByMapID(mapAreaID, self.currentMapID) if taskInfo then self:UpdateMap(taskInfo, mapAreaID) end