Skip to content

Commit

Permalink
Change how we scan for current quests
Browse files Browse the repository at this point in the history
  • Loading branch information
tekkub committed Oct 26, 2016
1 parent 67c9536 commit 3642b05
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Quecho.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,15 @@ function ns.QUEST_LOG_UPDATE()
currentquests, oldquests = oldquests, currentquests
wipe(currentquests)

local i, count, _, total = 0, 0, GetNumQuestLogEntries()
while count < total do
i = i + 1
local link = GetQuestLink(i)
local i, count = 0, 0
local _, total = GetNumQuestLogEntries()
for i=1,GetNumQuestLogEntries() do
local _, _, _, _, _, _, _, quest_id = GetQuestLogTitle(i)
local link = quest_id and GetQuestLink(quest_id)
if link then
count = count + 1
local id = ns.qids[link]
currentquests[id] = link
if ns.ProgressbarQuests[id] then
progressbars[id] = GetQuestObjectiveInfo(id, 1, false)
currentquests[quest_id] = link
if ns.ProgressbarQuests[quest_id] then
progressbars[quest_id] = GetQuestObjectiveInfo(quest_id, 1, false)
end
end
end
Expand Down

0 comments on commit 3642b05

Please sign in to comment.