Mercurial > wow > worldplan
comparison FlightMap.lua @ 49:dbd81d49af02
- Solve more frame data flagging issues
- Unify method for resolving filter and visibility states
- Flight Map modifications respect filter settings
- Solve initial draw issues with tag icon, filter state handling
- Solve issues with text layer synchronization during map changes
author | Nenue |
---|---|
date | Thu, 29 Dec 2016 13:31:20 -0500 |
parents | 589c444d4837 |
children | 6439015d74b1 |
comparison
equal
deleted
inserted
replaced
48:c0b88bd1e40b | 49:dbd81d49af02 |
---|---|
89 | 89 |
90 if taskInfo then | 90 if taskInfo then |
91 for i, info in ipairs(taskInfo) do | 91 for i, info in ipairs(taskInfo) do |
92 if HaveQuestData(info.questId) then | 92 if HaveQuestData(info.questId) then |
93 if QuestUtils_IsQuestWorldQuest(info.questId) then | 93 if QuestUtils_IsQuestWorldQuest(info.questId) then |
94 local pin = db.QuestsByID[info.questId] | 94 local pin = WorldPlanQuests:AcquirePin(info, zoneMapID) |
95 if not db.QuestsByID[info.questId] then | 95 if pin then |
96 pin = WorldPlanQuests:AcquirePin(info, zoneMapID) | 96 |
97 print(pin:GetID(), pin.used, pin.filtered) | |
98 | |
99 if pin.used then | |
100 print(i, pin.x, pin.y, pin.used, pin.isNew, pin.isStale, pin:IsShown(), pin:GetAlpha()) | |
101 pinsToRemove[info.questId] = nil; | |
102 | |
103 local frame = self.activePins[info.questId] | |
104 if not frame then | |
105 frame = self:GetMap():AcquirePin("WorldPlanFlightPin") | |
106 print(alpha1, alpha2, alpha3) | |
107 print(scale1, scale2, scale3) | |
108 frame:SetAlphaLimits(alpha1, alpha2, alpha3) | |
109 frame:SetScalingLimits(scale1, scale2, scale3); | |
110 frame:SetFrameLevel(1000 + self:GetMap():GetNumActivePinsByTemplate("WorldPlanFlightPin")); | |
111 frame:Show() | |
112 self.activePins[info.questId] = frame | |
113 end | |
114 frame:SetPosition(info.x, info.y) | |
115 frame.pin = pin | |
116 | |
117 pin.owningFrame = frame:GetMap() | |
118 pin.throttle = 1 | |
119 pin.isStale = true | |
120 | |
121 pin:SetParent(frame) | |
122 pin:ClearAllPoints() | |
123 pin:SetPoint('CENTER', frame, 'CENTER') | |
124 end | |
125 pin:SetShown(pin.used) | |
97 end | 126 end |
98 | 127 |
99 pin:IsShowable() | |
100 if pin.used then | |
101 print(i, pin.x, pin.y, pin.used, pin.isNew, pin.isStale, pin:IsShown(), pin:GetAlpha()) | |
102 pinsToRemove[info.questId] = nil; | |
103 | |
104 local frame = self.activePins[info.questId] | |
105 if not frame then | |
106 frame = self:GetMap():AcquirePin("WorldPlanFlightPin") | |
107 print(alpha1, alpha2, alpha3) | |
108 print(scale1, scale2, scale3) | |
109 frame:SetAlphaLimits(alpha1, alpha2, alpha3) | |
110 frame:SetScalingLimits(scale1, scale2, scale3); | |
111 frame:SetFrameLevel(1000 + self:GetMap():GetNumActivePinsByTemplate("WorldPlanFlightPin")); | |
112 frame:Show() | |
113 self.activePins[info.questId] = frame | |
114 end | |
115 frame:SetPosition(info.x, info.y) | |
116 frame.pin = pin | |
117 | |
118 pin.owningFrame = frame:GetMap() | |
119 pin.isStale = true | |
120 pin:SetParent(frame) | |
121 pin:ClearAllPoints() | |
122 pin:SetPoint('CENTER', frame, 'CENTER') | |
123 | |
124 end | |
125 pin:SetShown(pin.used) | |
126 end | 128 end |
127 end | 129 end |
128 end | 130 end |
129 end | 131 end |
130 end | 132 end |
138 for pin in self:GetMap():EnumeratePinsByTemplate("WorldQuestPinTemplate") do | 140 for pin in self:GetMap():EnumeratePinsByTemplate("WorldQuestPinTemplate") do |
139 pin:Hide() | 141 pin:Hide() |
140 end | 142 end |
141 | 143 |
142 end | 144 end |
145 | |
146 | |
147 | |
143 function WorldPlanDataProvider:OnEvent() | 148 function WorldPlanDataProvider:OnEvent() |
149 end | |
150 | |
151 function WorldPlanDataPinMixin:OnLoad() | |
152 self.UpdateTooltip = self.OnMouseEnter; | |
153 | |
154 -- Flight points can nudge world quests. | |
155 self:SetNudgeTargetFactor(0.015); | |
156 self:SetNudgeZoomedOutFactor(1.0); | |
157 self:SetNudgeZoomedInFactor(0.25); | |
144 end | 158 end |
145 | 159 |
146 function WorldPlanDataPinMixin:OnShow() | 160 function WorldPlanDataPinMixin:OnShow() |
147 end | 161 end |
148 | 162 |