Fix an issue where cycling through focused quests doesn't work
This commit is contained in:
parent
62cd01df3a
commit
37edad7920
|
@ -78,11 +78,11 @@ function AO_ToggleIgnoreQuest(questIndex)
|
|||
|
||||
local lastTracked = FOCUSED_QUEST_TRACKER:GetLastTracked()
|
||||
if lastTracked.trackType == TRACK_TYPE_QUEST and lastTracked.arg1 == questIndex then
|
||||
local IGNORE_SCENE_RESTRICTION = true
|
||||
FOCUSED_QUEST_TRACKER:AssistNext(IGNORE_SCENE_RESTRICTION)
|
||||
local unignoredQuest = AO_GetFirstUnignoredQuest()
|
||||
|
||||
lastTracked = FOCUSED_QUEST_TRACKER:GetLastTracked()
|
||||
if lastTracked.trackType == TRACK_TYPE_QUEST and lastTracked.arg1 == questIndex then
|
||||
if unignoredQuest then
|
||||
FOCUSED_QUEST_TRACKER:ForceAssist(unignoredQuest.questIndex)
|
||||
else
|
||||
FOCUSED_QUEST_TRACKER:ClearTracker()
|
||||
end
|
||||
end
|
||||
|
@ -109,6 +109,18 @@ function AO_IsQuestIgnored(quest)
|
|||
return AO_IGNORED_QUESTS[quest.name]
|
||||
end
|
||||
|
||||
function AO_GetFirstUnignoredQuest()
|
||||
local quests, categories, seenCategories = QUEST_JOURNAL_MANAGER:GetQuestListData()
|
||||
|
||||
for _, quest in ipairs(quests) do
|
||||
if quest and not AO_IsQuestIgnored(quest) then
|
||||
return quest
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
function AO_SortQuestCategories(entry1, entry2)
|
||||
if entry1.type == entry2.type then
|
||||
return entry1.name < entry2.name
|
||||
|
@ -176,7 +188,15 @@ FOCUSED_QUEST_TRACKER.BeginTracking = function(self, trackType, arg1, arg2)
|
|||
local questIndex = arg1
|
||||
|
||||
if AO_IsQuestIgnored(AO_GetQuestByIndex(questIndex)) then
|
||||
return
|
||||
local unignoredQuest = AO_GetFirstUnignoredQuest()
|
||||
|
||||
if unignoredQuest then
|
||||
FOCUSED_QUEST_TRACKER:ForceAssist(unignoredQuest.questIndex)
|
||||
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue