From fd0cf0a985af2927b179d172f87c005a66c73ad5 Mon Sep 17 00:00:00 2001 From: bdbch Date: Sat, 7 Feb 2026 14:46:19 +0100 Subject: [PATCH] fix quest reward XP aggregation --- State.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 -- 2.51.2