A World of Warcraft Experience Bar addon
worldofwarcraft wow addon midnight

fix quest XP tracking display

bdbch 9c6803d5 f87789d1

+26 -7
+23 -4
State.lua
··· 47 47 local rewardXP = GetQuestLogRewardXP(i) or 0 48 48 if rewardXP > 0 then 49 49 qXP = qXP + rewardXP 50 - if C_QuestLog.IsComplete(info.questID) or C_QuestLog.ReadyForTurnIn(info.questID) then 50 + 51 + local completeState = info.isComplete 52 + if completeState == nil then 53 + completeState = C_QuestLog.IsComplete(info.questID) 54 + end 55 + 56 + local isComplete = completeState == 1 57 + if not isComplete then 58 + isComplete = C_QuestLog.ReadyForTurnIn(info.questID) 59 + end 60 + 61 + if isComplete then 51 62 cXP = cXP + rewardXP 52 63 else 53 64 iXP = iXP + rewardXP ··· 77 88 status = "HEADER" 78 89 elseif info.isHidden then 79 90 status = "HIDDEN" 80 - elseif info.questID and (C_QuestLog.IsComplete(info.questID) or C_QuestLog.ReadyForTurnIn(info.questID)) then 81 - status = "COMPLETE" 82 91 else 83 - status = "INCOMPLETE" 92 + local completeState = info.isComplete 93 + if completeState == nil and info.questID then 94 + completeState = C_QuestLog.IsComplete(info.questID) 95 + end 96 + 97 + local isComplete = completeState == 1 98 + if not isComplete and info.questID then 99 + isComplete = C_QuestLog.ReadyForTurnIn(info.questID) 100 + end 101 + 102 + status = isComplete and "COMPLETE" or "INCOMPLETE" 84 103 end 85 104 86 105 print(string.format(" [%d] id=%s title=\"%s\" reward=%d status=%s isHeader=%s isHidden=%s",
+3 -3
UI.lua
··· 15 15 colorBorder = {0, 0, 0, 1}, 16 16 17 17 colorMain = {0.76, 0.38, 1, 1}, -- Base Purple 18 - colorRested = {0.34, 0.61, 0.99, .5}, -- Rested Blue 18 + colorRested = {0.34, 0.61, 0.99, .8}, -- Rested Blue 19 19 colorQuest = {1, 0.64, 0.0078, 0.25}, -- Quest Yellow 20 - colorQuestComplete = {1, 0.64, 0.0078, 0.5}, -- Completed Quest 20 + colorQuestComplete = {1, 0.64, 0.0078, 0.8}, -- Completed Quest 21 21 } 22 22 23 23 function F.UI.CreateStatusBar(parent, layer, subLevel, color) ··· 241 241 242 242 if s.maxXP > 0 and projectedQuest > projectedComplete and projectedComplete < s.maxXP then 243 243 F.BarQuest:Show() 244 - F.BarQuest:SetMinMaxValues(projectedComplete, maxXP) 244 + F.BarQuest:SetMinMaxValues(0, maxXP) 245 245 F.BarQuest:SetValue(math.min(projectedQuest, s.maxXP)) 246 246 else 247 247 F.BarQuest:Hide()