comparison WorldPlan.lua @ 8:802abb8a10ea

Fixed loss of mission progress data while changing zones by using `GARRISON_LANDINGPAGE_SHIPMENTS' as the trigger point for mission scoops. * `MISSION_LIST_UPDATE' fires before all data is available, and if this is happens on a loading screen, then several landing page items may get snipped.
author Nenue
date Sun, 23 Oct 2016 07:19:53 -0400
parents 34d9fbf7af20
children a2b623043970
comparison
equal deleted inserted replaced
7:34d9fbf7af20 8:802abb8a10ea
175 { filterKey= 'rewardType', filterValue = REWARD_CASH, label = 'Reagents', texture = ICON_MONEY }, 175 { filterKey= 'rewardType', filterValue = REWARD_CASH, label = 'Reagents', texture = ICON_MONEY },
176 { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PVP, label = 'PvP', texture = "Interface\\Icons\\Ability_PVP_GladiatorMedallion", spacing = 10 }, 176 { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PVP, label = 'PvP', texture = "Interface\\Icons\\Ability_PVP_GladiatorMedallion", spacing = 10 },
177 { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PET_BATTLE, label = 'Pet Battle', texture = "Interface\\Icons\\PetJournalPortrait", }, 177 { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PET_BATTLE, label = 'Pet Battle', texture = "Interface\\Icons\\PetJournalPortrait", },
178 { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_DUNGEON, label = 'Dungeon', texture = "Interface\\LFGFRAME\\UI-LFR-PORTRAIT", }, 178 { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_DUNGEON, label = 'Dungeon', texture = "Interface\\LFGFRAME\\UI-LFR-PORTRAIT", },
179 } 179 }
180 WorldPlanCore.BrokenIsleID = BROKEN_ISLES_ID
181 WorldPlanCore.FilterOptions = POI_FILTER_OPTIONS
182 WorldPlanCore.FilterStyle = POI_FILTER_STYLE
183
180 184
181 local numPins = 0 185 local numPins = 0
182 local QuestsByZone = {} 186 local QuestsByZone = {}
183 local QuestsByFaction = {} 187 local QuestsByFaction = {}
184 local QuestsByReward = {} 188 local QuestsByReward = {}
188 local FilterInclusions = {rewardType = {}, worldQuestType = {}} 192 local FilterInclusions = {rewardType = {}, worldQuestType = {}}
189 local FilterExclusions = {rewardType = {}, worldQuestType = {} } 193 local FilterExclusions = {rewardType = {}, worldQuestType = {} }
190 local NotificationTypes = {} 194 local NotificationTypes = {}
191 local ZoneInfo = {} 195 local ZoneInfo = {}
192 local SummaryHeaders = {} 196 local SummaryHeaders = {}
197 WorldPlanCore.QuestsByID = QuestsByID
198 WorldPlanCore.QuestsByZone = QuestsByZone
193 199
194 local FreePins = {} 200 local FreePins = {}
195 local NumPinFrames = 1 201 local NumPinFrames = 1
196 202
197 local hasPendingQuestData 203 local hasPendingQuestData
1155 1161
1156 function FilterPin:OnUpdate () 1162 function FilterPin:OnUpdate ()
1157 1163
1158 end 1164 end
1159 1165
1160 function FilterPin:OnEnter ()
1161 local filter = POI_FILTER_OPTIONS[self:GetID()]
1162 local mapID = GetCurrentMapAreaID()
1163 local quests = (mapID == BROKEN_ISLES_ID) and QuestsByID or QuestsByZone[mapID]
1164 if quests then
1165 GameTooltip:SetOwner(self, 'ANCHOR_RIGHT')
1166 GameTooltip:AddLine(filter.label)
1167 local filterKey = self.filterKey
1168 local filterValue = self.filterValue
1169 if filterKey then
1170 for questID, pin in pairs(quests) do
1171 if pin.used and not pin.filtered then
1172 if pin[filterKey] == filterValue then
1173 local style = pin.style or POI_FILTER_STYLE
1174 GameTooltip:AddLine(pin.title)
1175 end
1176 end
1177 end
1178 else
1179 GameTooltip:AddLine('Reset all filters')
1180 end
1181 GameTooltip:Show()
1182 end
1183 end
1184 function FilterPin:OnLeave () 1166 function FilterPin:OnLeave ()
1185 if GameTooltip:IsOwned(self) then 1167 if GameTooltip:IsOwned(self) then
1186 GameTooltip:Hide() 1168 GameTooltip:Hide()
1187 end 1169 end
1188 end 1170 end