From 25f2ece13958c90c646fe189d6ff8b1b5aa50049 Mon Sep 17 00:00:00 2001 From: Xurkon <36556990+Xurkon@users.noreply.github.com> Date: Sat, 21 Feb 2026 11:44:32 -0600 Subject: [PATCH] Fix IsComplete: check numFulfilled==numRequired instead of finished flag The finished flag in QuestLogCache is only set to true when the server sends isComplete=1 via GetQuestLogTitle. For quest 12843 ('They Took Our Men!'), after using all Cold Iron Keys the objectives numerically complete (5/5) but isComplete=1 may not fire until the player visits the turn-in NPC. Use numFulfilled == numRequired as the completion check instead, which updates from GetQuestLogLeaderBoard immediately when each objective fills. Added numRequired > 0 guard to avoid trivially matching zero-required objectives. --- Database/QuestieDB.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Database/QuestieDB.lua b/Database/QuestieDB.lua index 3b40286..a530217 100644 --- a/Database/QuestieDB.lua +++ b/Database/QuestieDB.lua @@ -1090,12 +1090,14 @@ function QuestieDB.IsComplete(questId) return (noQuestItem and 0) or 1 end - -- Check if every objective is finished. Some quests consume their source item (e.g. Cold Iron Key) - -- so CheckQuestSourceItem returns false even though all objectives are done. We should not return 0 - -- in that case because it causes Questie to draw the item-drop NPC on the map instead of the finisher. + -- Check if every objective is fulfilled. Use numFulfilled == numRequired rather than the + -- finished flag, because finished is only set by QuestLogCache when the server sends + -- isComplete=1 via GetQuestLogTitle. For quests using consumable items (e.g. Cold Iron Key + -- for quest 12843), the key is consumed and numFulfilled/numRequired update immediately, + -- but isComplete=1 may not arrive until the player physically visits the turn-in NPC. local allDone = true for _, obj in ipairs(objectives) do - if not obj.finished then + if obj.numRequired and obj.numRequired > 0 and obj.numFulfilled ~= obj.numRequired then allDone = false break end