diff --git a/State.lua b/State.lua index 13fa6a8..2a42ef3 100644 --- a/State.lua +++ b/State.lua @@ -44,7 +44,12 @@ function F.State:UpdateQuestXP() -- this skips the XP header for a category / campaign as they should not be respected if info and not info.isHeader and not info.isHidden and info.questID > 0 then -- Use the quest log index when querying the reward XP - local rewardXP = GetQuestLogRewardXP(i) or 0 + local rewardXP = 0 + if info.questID and C_QuestLog.GetQuestLogRewardXP then + rewardXP = C_QuestLog.GetQuestLogRewardXP(info.questID) or 0 + else + rewardXP = GetQuestLogRewardXP(i) or 0 + end if rewardXP > 0 then qXP = qXP + rewardXP @@ -81,7 +86,12 @@ function F.State:DebugDumpQuests() for i = 1, numEntries do local info = C_QuestLog.GetInfo(i) if info then - local reward = GetQuestLogRewardXP(i) or 0 + local reward = 0 + if info.questID and C_QuestLog.GetQuestLogRewardXP then + reward = C_QuestLog.GetQuestLogRewardXP(info.questID) or 0 + else + reward = GetQuestLogRewardXP(i) or 0 + end local status = "UNKNOWN" if info.isHeader then