Skip to content

Commit

Permalink
Fix completeItem data not accounting for zone
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Aug 1, 2022
1 parent 148d9a2 commit a94f377
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions ItemData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ ns.itemData.completeItems = {
[35797] = 116, -- Grizzly Hills
[41058] = 120, -- Storm Peaks
[52853] = true, -- Mount Hyjal
[57412] = 205, -- Shimmering Expanse
[60273] = 50, -- Northern Stranglethorn Vale
[62508] = 241, -- Twilight Highlands
[63357] = 36, -- Burning Steppes
Expand Down
9 changes: 8 additions & 1 deletion Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@ local function GetQuestDistanceWithItem(questID)

local itemID = GetItemInfoFromHyperlink(itemLink)
if C_QuestLog.IsComplete(questID) then
if not showWhenComplete and not itemData.completeItems[itemID] then
local completeItemZone = itemData.completeItems[itemID]
if not showWhenComplete and not completeItemZone then
return
end

if completeItemZone and type(completeItemZone) == 'number' then
if HBD:GetPlayerZone() ~= completeItemZone then
return
end
end

local noCompleteItem = itemData.noCompleteItems[itemID]
if noCompleteItem then
if type(noCompleteItem) == 'number' then
Expand Down

0 comments on commit a94f377

Please sign in to comment.