# HG changeset patch # User Nenue # Date 1477221593 14400 # Node ID 802abb8a10eae28975d673f809f142421a72d42e # Parent 34d9fbf7af201e89529288b7eb9cd3d6ccd190de 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. diff -r 34d9fbf7af20 -r 802abb8a10ea .idea/uiDesigner.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.idea/uiDesigner.xml Sun Oct 23 07:19:53 2016 -0400 @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 34d9fbf7af20 -r 802abb8a10ea ClassPlan.lua --- a/ClassPlan.lua Sat Oct 22 15:36:25 2016 -0400 +++ b/ClassPlan.lua Sun Oct 23 07:19:53 2016 -0400 @@ -28,7 +28,7 @@ } ClassPlanMissionMixin = { templateName = 'ClassPlanMissionEntry', - events = {'GARRISON_MISSION_LIST_UPDATE', 'GARRISON_MISSION_STARTED', 'GARRISON_MISSION_FINISHED'},} + events = {'GARRISON_MISSION_LIST_UPDATE', 'GARRISON_MISSION_STARTED', 'GARRISON_MISSION_FINISHED', 'GARRISON_LANDINGPAGE_SHIPMENTS'},} ClassPlanShipmentMixin = { templateName = 'ClassPlanShipmentEntry', parent = false, @@ -56,19 +56,16 @@ if not self.profile then return end - self.items = C_Garrison.GetLandingPageItems(LE_GARRISON_TYPE_7_0) + local items = C_Garrison.GetLandingPageItems(LE_GARRISON_TYPE_7_0) + print(#items) wipe(self.profile.missions) - for index, data in ipairs(self.items) do + for index, data in ipairs(items) do print(' ',data.name, '|cFF00FF00'.. data.timeLeft .. '|r', date("%A %I:%m %p", data.missionEndTime)) tinsert(self.profile.missions, data) end print('items update pending') self.isStale = true - - if self:IsVisible() then - self:Refresh() - end end MissionsHandler.OnGetItem = function(data) @@ -131,7 +128,7 @@ if not creationTime then return end - print(shipmentType, name, shipmentCapacity, shipmentsReady, shipmentsTotal, creationTime, duration, timeleftString) + --print(shipmentType, name, shipmentCapacity, shipmentsReady, shipmentsTotal, creationTime, duration, timeleftString) tinsert(ShipmentsInfo, { shipmentType = shipmentType, @@ -203,14 +200,10 @@ end self.isStale = true - if self:IsVisible() then - self:Refresh() - end end function core:OnLoad () self:RegisterEvent('PLAYER_LOGIN') - self:RegisterEvent('PLAYER_ENTERING_WORLD') self:RegisterEvent('ADDON_LOADED') self:RegisterEvent('PLAYER_REGEN_ENABLED') self:RegisterEvent('PLAYER_REGEN_DISABLED') @@ -343,6 +336,11 @@ print('|cFF88FF00' .. tostring(ptype) .. '|r:GetPlayerData() --', numCalls) eventFunc(self, event) end + + + if self:IsVisible() then + self:Refresh() + end end end diff -r 34d9fbf7af20 -r 802abb8a10ea QuestPOI.lua --- a/QuestPOI.lua Sat Oct 22 15:36:25 2016 -0400 +++ b/QuestPOI.lua Sun Oct 23 07:19:53 2016 -0400 @@ -209,4 +209,36 @@ else self.MouseGlow:Hide() end +end + + +function WorldPlanFilterPinMixin:OnEnter () + local filter = WorldPlan.FilterOptions[self:GetID()] + local mapID = GetCurrentMapAreaID() + local quests = (mapID == WorldPlan.BrokenIsleID) and WorldPlan.QuestsByID or WorldPlan.QuestsByZone[mapID] + if quests then + GameTooltip:SetOwner(self, 'ANCHOR_RIGHT') + GameTooltip:AddLine(filter.label) + local filterKey = self.filterKey + local filterValue = self.filterValue + if filterKey then + for questID, pin in pairs(quests) do + if pin.used and not pin.filtered then + if pin[filterKey] == filterValue then + local style = pin.style or WorldPlan.FilterStyle + + if familiars[questID] then + GameTooltip:AddLine(pin.title,0,1,0) + else + GameTooltip:AddLine(pin.title,1,1,1) + end + + end + end + end + else + GameTooltip:AddLine('Reset all filters') + end + GameTooltip:Show() + end end \ No newline at end of file diff -r 34d9fbf7af20 -r 802abb8a10ea WorldPlan.lua --- a/WorldPlan.lua Sat Oct 22 15:36:25 2016 -0400 +++ b/WorldPlan.lua Sun Oct 23 07:19:53 2016 -0400 @@ -177,6 +177,10 @@ { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_PET_BATTLE, label = 'Pet Battle', texture = "Interface\\Icons\\PetJournalPortrait", }, { filterKey= 'worldQuestType', filterValue = LE_QUEST_TAG_TYPE_DUNGEON, label = 'Dungeon', texture = "Interface\\LFGFRAME\\UI-LFR-PORTRAIT", }, } +WorldPlanCore.BrokenIsleID = BROKEN_ISLES_ID +WorldPlanCore.FilterOptions = POI_FILTER_OPTIONS +WorldPlanCore.FilterStyle = POI_FILTER_STYLE + local numPins = 0 local QuestsByZone = {} @@ -190,6 +194,8 @@ local NotificationTypes = {} local ZoneInfo = {} local SummaryHeaders = {} +WorldPlanCore.QuestsByID = QuestsByID +WorldPlanCore.QuestsByZone = QuestsByZone local FreePins = {} local NumPinFrames = 1 @@ -1157,30 +1163,6 @@ end -function FilterPin:OnEnter () - local filter = POI_FILTER_OPTIONS[self:GetID()] - local mapID = GetCurrentMapAreaID() - local quests = (mapID == BROKEN_ISLES_ID) and QuestsByID or QuestsByZone[mapID] - if quests then - GameTooltip:SetOwner(self, 'ANCHOR_RIGHT') - GameTooltip:AddLine(filter.label) - local filterKey = self.filterKey - local filterValue = self.filterValue - if filterKey then - for questID, pin in pairs(quests) do - if pin.used and not pin.filtered then - if pin[filterKey] == filterValue then - local style = pin.style or POI_FILTER_STYLE - GameTooltip:AddLine(pin.title) - end - end - end - else - GameTooltip:AddLine('Reset all filters') - end - GameTooltip:Show() - end -end function FilterPin:OnLeave () if GameTooltip:IsOwned(self) then GameTooltip:Hide()