Fix Lua truthiness bug in QuestieDB.IsComplete

In Lua, 0 evaluates as truthy. The check
'if questLogEntry.isComplete then return questLogEntry.isComplete end'
was completely bypassing our fallback completion logic because
GetQuestLogTitle sets isComplete = 0 when a quest is incomplete.

This caused the arrow to still point to requiredSourceItems (like
the Cold Iron Key drops) because the quest was never being flagged
as 'isComplete=true' internally.

Fixed by explicitly checking for isComplete == 1 or isComplete == -1
before returning.
This commit is contained in:
Xurkon
2026-02-21 12:18:45 -06:00
parent 1248d7a1f6
commit 922fa8e0ff
+3 -1
View File
@@ -1083,7 +1083,9 @@ function QuestieDB.IsComplete(questId)
--]]
if not questLogEntry then return 0 end
if questLogEntry.isComplete then return questLogEntry.isComplete end
if questLogEntry.isComplete == 1 or questLogEntry.isComplete == -1 then
return questLogEntry.isComplete
end
local objectives = questLogEntry.objectives
if not objectives or #objectives == 0 then