Skip to content

Commit

Permalink
Respect tracking setting
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Dec 20, 2024
1 parent ea0390a commit 4ee48c1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,15 @@ function addon:GetClosestQuestItem(maxDistanceYd, zoneOnly, trackingOnly)
end
end

for index = 1, C_QuestLog.GetNumQuestLogEntries() do
local info = C_QuestLog.GetInfo(index)
if info and not info.isHeader and info.hasLocalPOI then
local questID = info.questID
if C_QuestLog.IsWorldQuest(questID) or info.questClassification == Enum.QuestClassification.BonusObjective or (trackingOnly and not info.isHidden) then
if not zoneOnly or IsQuestOnMapCurrentMap(questID) then
addPrioritizedItem(questID, maxDistanceYd)
if not trackingOnly then
for index = 1, C_QuestLog.GetNumQuestLogEntries() do
local info = C_QuestLog.GetInfo(index)
if info and not info.isHeader and info.hasLocalPOI then
local questID = info.questID
if C_QuestLog.IsWorldQuest(questID) or info.questClassification == Enum.QuestClassification.BonusObjective or (trackingOnly and not info.isHidden) then
if not zoneOnly or IsQuestOnMapCurrentMap(questID) then
addPrioritizedItem(questID, maxDistanceYd)
end
end
end
end
Expand Down

0 comments on commit 4ee48c1

Please sign in to comment.