Skip to content

Commit 67e0c4f

Browse files
committed
Updated function references and usage to be compatible with Patch 9.0.1 and 9.0.2 API Changes.
1 parent 85bb070 commit 67e0c4f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

LibObjectiveProgress-1.0.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ local LOP, oldversion = LibStub:NewLibrary(MAJOR, MINOR)
1212
if not LOP then return end
1313

1414
-- Localized function references
15-
local GetNumQuestLogEntries = _G.GetNumQuestLogEntries
16-
local GetQuestLogTitle = _G.GetQuestLogTitle
15+
local CQL_GetNumQuestLogEntries = _G.C_QuestLog.GetNumQuestLogEntries
16+
local CQL_GetInfo = _G.C_QuestLog.GetInfo
1717

1818

1919
function LOP:GetNPCWeightByMap(mapID, npcID, isTeeming, isAlternate)
@@ -50,16 +50,16 @@ function LOP:GetNPCWeightByCurrentQuests(npcID)
5050
local questTable = nil
5151

5252
-- Get NPC weight for all quests in log
53-
local numEntries = GetNumQuestLogEntries()
53+
local numEntries = CQL_GetNumQuestLogEntries()
5454
for questLogIndex = 1, numEntries do
55-
local _, _, _, isHeader, _, _, _, questID = GetQuestLogTitle(questLogIndex)
55+
local questInfo = CQL_GetInfo(questLogIndex)
5656

5757
-- If this row isn't a header, has a valid questID, and has a valid weight, then initialize the table and record the questID/weight pair
58-
if not isHeader and questID ~= 0 then
59-
local weight = LOP:GetNPCWeightByQuest(questID, npcID)
58+
if questInfo and not questInfo.isHeader and questInfo.questID ~= 0 then
59+
local weight = LOP:GetNPCWeightByQuest(questInfo.questID, npcID)
6060
if weight then
6161
questTable = questTable or {}
62-
questTable[questID] = weight
62+
questTable[questInfo.questID] = weight
6363
end
6464
end
6565
end

0 commit comments

Comments
 (0)