Mercurial > wow > worldplan
comparison QuestPOI.lua @ 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 |
comparison
equal
deleted
inserted
replaced
55:6a2e85836219 | 56:0749e38081e7 |
---|---|
26 local iprint = DEVIAN_WORKSPACE and function(...) _G.print('ItemScan', ...) end or function() end | 26 local iprint = DEVIAN_WORKSPACE and function(...) _G.print('ItemScan', ...) end or function() end |
27 local rprint = DEVIAN_WORKSPACE and function(...) _G.print('WQRefresh', ...) end or function() end | 27 local rprint = DEVIAN_WORKSPACE and function(...) _G.print('WQRefresh', ...) end or function() end |
28 local dprint = DEVIAN_WORKSPACE and function(...) _G.print('WQData', ...) end or function() end | 28 local dprint = DEVIAN_WORKSPACE and function(...) _G.print('WQData', ...) end or function() end |
29 local QuestPOI = WorldPlanPOIMixin | 29 local QuestPOI = WorldPlanPOIMixin |
30 | 30 |
31 local pinBaseIndex = 1300 | |
32 local overlayBaseIndex = 1350 | |
33 local previousHighlight | |
31 | 34 |
32 local PIN_REFRESH_DELAY = .5 | 35 local PIN_REFRESH_DELAY = .5 |
33 local PIN_REQUEST_DELAY = .1 | 36 local PIN_REQUEST_DELAY = .1 |
34 local ICON_UNKNOWN = "Interface\\ICONS\\inv_misc_questionmark" | 37 local ICON_UNKNOWN = "Interface\\ICONS\\inv_misc_questionmark" |
35 local ICON_MONEY = "Interface\\Buttons\\UI-GroupLoot-Coin-Up" | 38 local ICON_MONEY = "Interface\\Buttons\\UI-GroupLoot-Coin-Up" |
186 end | 189 end |
187 | 190 |
188 local GetFactionInfoByID, GetQuestObjectiveInfo = GetFactionInfoByID, GetQuestObjectiveInfo | 191 local GetFactionInfoByID, GetQuestObjectiveInfo = GetFactionInfoByID, GetQuestObjectiveInfo |
189 | 192 |
190 function QuestPOI:OnEnter() | 193 function QuestPOI:OnEnter() |
191 if not WorldMapFrame:IsVisible() then | 194 WorldMap_HijackTooltip(self.owningFrame); |
192 end | |
193 if self.filtered then | 195 if self.filtered then |
194 return | 196 return |
195 end | 197 end |
198 self:SetFrameLevel(pinBaseIndex+100) | |
199 self.Overlay:SetFrameLevel(pinBaseIndex+101) | |
200 | |
201 if previousHighlight then | |
202 previousHighlight:SetFrameLevel(pinBaseIndex+previousHighlight:GetID()) | |
203 previousHighlight.Overlay:SetFrameLevel(overlayBaseIndex+previousHighlight:GetID()) | |
204 end | |
205 | |
206 previousHighlight = self | |
207 | |
208 | |
196 WorldMapTooltip:SetOwner(self, "ANCHOR_RIGHT"); | 209 WorldMapTooltip:SetOwner(self, "ANCHOR_RIGHT"); |
197 --print('doing tooltip stuff') | 210 --print('doing tooltip stuff') |
198 | 211 |
199 -- Can't add stuff after, so most of the blizzard tooltip hook is simply copied over | 212 -- Can't add stuff after, so most of the blizzard tooltip hook is simply copied over |
200 local questID = self.questID | 213 local questID = self.questID |
420 self.isAnimating = nil | 433 self.isAnimating = nil |
421 self:SetAlpha(db.PinAlpha) | 434 self:SetAlpha(db.PinAlpha) |
422 self.Overlay:SetShown(false) | 435 self.Overlay:SetShown(false) |
423 end | 436 end |
424 | 437 |
425 local overlayBaseIndex = 1300 | |
426 function QuestPOI:SetAnchor(owner, dX, dY, mapWidth, mapHeight) | 438 function QuestPOI:SetAnchor(owner, dX, dY, mapWidth, mapHeight) |
427 wqprint(self:GetName()..':SetAnchor', self.filtered, self.used) | 439 wqprint(self:GetName()..':SetAnchor', self.filtered, self.used) |
428 self:SetParent(owner) | 440 self:SetParent(owner) |
429 self:ClearAllPoints() | 441 self:ClearAllPoints() |
430 self:SetFrameLevel(overlayBaseIndex + self:GetID()) | 442 self:SetFrameLevel(pinBaseIndex + self:GetID()) |
431 self.Overlay:SetParent(owner) | 443 self.Overlay:SetParent(owner) |
432 self.Overlay:SetFrameLevel(overlayBaseIndex + self:GetID()) | 444 self.Overlay:SetFrameLevel(overlayBaseIndex + self:GetID()) |
433 if (dX and dY) then | 445 if (dX and dY) then |
434 if not (mapHeight and mapWidth) then | 446 if not (mapHeight and mapWidth) then |
435 mapWidth, mapHeight = owner:GetSize() | 447 mapWidth, mapHeight = owner:GetSize() |
692 local borderWidth = iconWidth + (subStyle.borderWidth * 2) | 704 local borderWidth = iconWidth + (subStyle.borderWidth * 2) |
693 local highlightWidth = borderWidth + (subStyle.highlightWidth * 2) | 705 local highlightWidth = borderWidth + (subStyle.highlightWidth * 2) |
694 local iconTexture = self.itemTexture | 706 local iconTexture = self.itemTexture |
695 | 707 |
696 | 708 |
709 self:SetSize(highlightWidth, highlightWidth) | |
697 if self.questID == GetSuperTrackedQuestID() then | 710 if self.questID == GetSuperTrackedQuestID() then |
698 highlightWidth = highlightWidth + 2 | 711 highlightWidth = highlightWidth + 2 |
699 end | 712 end |
700 | 713 |
701 if self.rarity and WORLD_QUEST_QUALITY_COLORS[self.rarity] then | 714 if self.rarity and WORLD_QUEST_QUALITY_COLORS[self.rarity] then |
702 highlightWidth = highlightWidth + self.rarity | 715 highlightWidth = highlightWidth + self.rarity |
703 end | 716 end |
704 self.tagIcon:SetSize(self.tagSize, self.tagSize) | 717 self.tagIcon:SetSize(self.tagSize, self.tagSize) |
705 self:SetSize(iconWidth, iconWidth) | |
706 icon:SetSize(iconWidth, iconWidth) | 718 icon:SetSize(iconWidth, iconWidth) |
707 iconBorder:SetSize(borderWidth, borderWidth) | 719 iconBorder:SetSize(borderWidth, borderWidth) |
708 trackingBorder:SetSize(highlightWidth, highlightWidth) | 720 trackingBorder:SetSize(highlightWidth, highlightWidth) |
709 | 721 |
710 | 722 |