Mercurial > wow > worldplan
changeset 56:0749e38081e7
- More fixes for map updates from non-Legion zones.
author | Nenue |
---|---|
date | Tue, 03 Jan 2017 20:04:16 -0500 |
parents | 6a2e85836219 |
children | 54aa7f8ebca8 |
files | FlightMap.lua QuestPOI.lua WorldPlan.lua WorldPlan.xml WorldQuests.lua |
diffstat | 5 files changed, 43 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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)
--- 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)
--- 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 @@ </Animations> <Layers> <Layer level="BACKGROUND" textureSubLevel="-2"> - <Texture parentKey="MouseGlow" file="Interface\WorldMap\UI-QuestPoi-IconGlow" alphaMode="ADD" hidden="true"> - <Anchors> - <Anchor point="BOTTOMLEFT" x="-12" y="-12" /> - <Anchor point="TOPRIGHT" x="12" y="12" /> - </Anchors> - </Texture> <Texture parentKey="HighlightBorder" desaturated="true"> <Anchors> <Anchor point="CENTER" /> @@ -80,6 +74,12 @@ <Anchor point="CENTER" /> </Anchors> </Texture> + <Texture parentKey="MouseGlow" file="Interface\UNITPOWERBARALT\Generic1Target_Circular_Frame" alphaMode="ADD" hidden="true"> + <Anchors> + <Anchor point="BOTTOMLEFT" x="-2" y="-2" /> + <Anchor point="TOPRIGHT" x="2" y="2" /> + </Anchors> + </Texture> </Layer> <Layer level="BORDER"> <Texture parentKey="icon" setAllPoints="true">
--- 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