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:
@@ -1083,7 +1083,9 @@ function QuestieDB.IsComplete(questId)
|
|||||||
--]]
|
--]]
|
||||||
|
|
||||||
if not questLogEntry then return 0 end
|
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
|
local objectives = questLogEntry.objectives
|
||||||
if not objectives or #objectives == 0 then
|
if not objectives or #objectives == 0 then
|
||||||
|
|||||||
Reference in New Issue
Block a user