diff FilterBar.lua @ 59:bc09961d5a98

fix attempts for lingering quest text and filter bar data
author Nenue
date Wed, 01 Feb 2017 17:44:20 -0500
parents 54aa7f8ebca8
children 31de7e9e7849
line wrap: on
line diff
--- a/FilterBar.lua	Fri Jan 20 19:57:42 2017 -0500
+++ b/FilterBar.lua	Wed Feb 01 17:44:20 2017 -0500
@@ -200,24 +200,28 @@
 
     for questID, pin in pairs(db.QuestsByID) do
       --print(pin.worldQuestType ~= LE_QUEST_TAG_TYPE_PROFESSION, (db.Config.ShowAllProfessionQuests or pin.isKnownProfession))
-      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
+      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
+            if mapQuests[questID] then
               numQuestsHere = numQuestsHere + 1
+              tinsert(info.questList, pin)
+            end
+            numQuestsTotal = numQuestsTotal + 1
           end
-          numQuestsTotal = numQuestsTotal + 1
-        elseif pin[info.filterKey] == info.filterValue then
-          if mapQuests[questID] then
-            numQuestsHere = numQuestsHere + 1
-            tinsert(info.questList, pin)
-          end
-          numQuestsTotal = numQuestsTotal + 1
         end
       end
+
     end
     --print('num here', numQuestsHere, numQuestsTotal)
-    info.totalQuests = maxQuests
+    info.totalQuests = numQuestsTotal
 
     --print(tostring(index).. ' ("'..tostring(info.label)..'" f('.. tostring(info.filterKey).. '='..tostring(info.filterValue) .. '), '..tostring(numQuests)..')')