# HG changeset patch # User Nenue # Date 1491859768 14400 # Node ID 26d736fbfe6710ecdd438043bed76864799251fd # Parent 2a86d6584ddd6b7bf67439466862f0731e7d7b82 - Fixed filter bar issues diff -r 2a86d6584ddd -r 26d736fbfe67 FilterBar.lua --- a/FilterBar.lua Mon Apr 10 16:44:45 2017 -0400 +++ b/FilterBar.lua Mon Apr 10 17:29:28 2017 -0400 @@ -184,7 +184,7 @@ local relativeFrame = self local numHeaders = 0 - print('|cFF00FF88'..self:GetName()..':Update()|r', 'currentMap=',WorldPlan.currentMapID) + print('|cFF00FF88'..self:GetName()..':Update()|r', 'currentMap=',db.currentMapID) local layout = db.DefaultFilterType @@ -203,13 +203,14 @@ if pin.used then if (pin.worldQuestType ~= LE_QUEST_TAG_TYPE_PROFESSION) or (db.Config.ShowAllProfessionQuests or pin.isKnownProfession) then - --print(pin.title) + if not info.filterKey then if mapQuests[questID] then numQuestsHere = numQuestsHere + 1 end numQuestsTotal = numQuestsTotal + 1 elseif pin[info.filterKey] == info.filterValue then + print(pin.title, mapQuests[questID]) if mapQuests[questID] then numQuestsHere = numQuestsHere + 1 tinsert(info.questList, pin) diff -r 2a86d6584ddd -r 26d736fbfe67 QuestPOI.lua --- a/QuestPOI.lua Mon Apr 10 16:44:45 2017 -0400 +++ b/QuestPOI.lua Mon Apr 10 17:29:28 2017 -0400 @@ -523,7 +523,7 @@ }) if not foundPrimary then --print(' -updating primary') - rewardType = REWARD_GEAR + rewardType = REWARD_REAGENT rewardIcon = texture rewardName = name @@ -661,7 +661,7 @@ if scaleFactor then - --print('scaleFactor') + print('scaleFactor') self:SetScale(scaleFactor) self.Overlay:SetScale(scaleFactor) self.scaleFactor = scaleFactor @@ -1025,9 +1025,11 @@ print(' '..self.questID..':|cFFFFFF00CheckFilterRules()|r', filtered, self.title) if self.filtered ~= filtered then + wqprint('|cFF00FF00filter changed') self.isStale = true end + self.filtered = filtered self.used = true self:SetShown(true) end diff -r 2a86d6584ddd -r 26d736fbfe67 WorldQuests.lua --- a/WorldQuests.lua Mon Apr 10 16:44:45 2017 -0400 +++ b/WorldQuests.lua Mon Apr 10 17:29:28 2017 -0400 @@ -573,18 +573,19 @@ -- Updates quest markers in taskInfo while associating them with the given map function Module:UpdateQuestsForMap(taskInfo, mapID) - if mapID then - db.QuestsByZone[mapID] = db.QuestsByZone[mapID] or {} + print('UpdateQuestsForMap()', GetMapNameByID(mapID), GetMapNameByID(db.currentMapID), layoutDirty) + if db.QuestsByZone[mapID] then wipe(db.QuestsByZone[mapID]) end - print('UpdateQuestsForMap()', GetMapNameByID(mapID), GetMapNameByID(db.currentMapID), layoutDirty) + + for index, info in pairs(taskInfo) do local questID, x, y = info.questId, info.x, info.y local pin = self:AcquirePin(info) if pin then - print(pin.title, pin.isStale) + print(pin.title, pin.isStale, layoutDirty, (pin.owningFrame ~= WorldMapFrame)) if pin:IsShown() and (layoutDirty or pin.isStale or (pin.owningFrame ~= WorldMapFrame)) then local scaleFactor = SCALE_FACTORS[(pin.dataLoaded and not pin.filtered) and scaleConstant or 1] pin.owningFrame = WorldMapFrame @@ -592,15 +593,15 @@ if pin.isStale then pin:Refresh('WORLDMAP_REFRESH ' .. GetTime()) end - if mapID then - db.QuestsByZone[mapID][questID] = pin - end else if layoutDirty then pin.isStale = true end end + if db.QuestsByZone[mapID] and pin.used then + db.QuestsByZone[mapID][questID] = pin + end end end @@ -634,6 +635,9 @@ for i = 1, numZones do local mapAreaID = MC_GetZoneInfo(db.currentMapID, i) local taskInfo = TQ_GetQuestsForPlayerByMapID(mapAreaID, db.currentMapID) + + db.QuestsByZone[mapAreaID] = db.QuestsByZone[mapAreaID] or {} + if taskInfo then self:UpdateQuestsForMap(taskInfo, mapAreaID) end