Questie

Questie

122M Downloads

The "Complete" tag is not removed from repeatable quests after turning them in.

Cabro opened this issue ยท 14 comments

commented
tag.mp4

8.9.0

commented
[13:14:01] Dump: value=QuestLogCache.questLog_DO_NOT_MODIFY[8507]
[13:14:01] empty result
commented

Oh wait, isComplete = 0 means incomplete, so the QuestLogCache is correct.

commented

What does /dump QuestieDB:GetQuest(8507).isComplete return?

commented
[13:21:25] Dump: value=QuestieDB:GetQuest(8507).isComplete
[13:21:25] [1]=true

Which is curious, since i don't have that quest in log anymore.

I also ran additionally the /run print(C_QuestLog.IsQuestFlaggedCompleted(8507)) and it returned false, so this is a Questie issue.

Also, while the NPC tooltip shows the "complete" tag, the map doesnt:
image

Maybe Questie simply doesn't clear the quests' status after turning in the repeatable quest?

commented

What does /dump QuestieDB.IsComplete(questId) return after turn in?

commented
[12:24:58] Dump: value=QuestieDB.IsComplete(8507)
[12:24:58] [1]=0
commented

Then this is a bug in the QuestLogCache not recognizing the quest was removed from the quest log.

commented

QuestLogCache seems to cause quite a few problems lately :(

commented

If you didn't do a /reload yet, can you do:

/dump QuestLogCache.questLog_DO_NOT_MODIFY[8507]

commented
[16:16:46] Dump: value=QuestieDB:GetQuest(8507):IsComplete()
[16:16:46] [1]=0
commented

Can you also report the output of: /dump QuestieDB:GetQuest(questId):IsComplete()?

commented

Alright. Looks like quest.isComplete flag is not reset correctly and/or we get a cached value.

Can you add the following lines to the following place and try again?

function QuestieQuest:CompleteQuest(questId)

function QuestieQuest:CompleteQuest(questId)
+   QuestiePlayer.currentQuestlog[questId].WasComplete = nil
+   QuestiePlayer.currentQuestlog[questId].isComplete = nil
    QuestiePlayer.currentQuestlog[questId] = nil;

    -- Only quests that are daily quests or aren't repeatable should be marked complete,
    -- otherwise objectives for repeatable quests won't track correctly - #1433
    Questie.db.char.complete[questId] = QuestieDB.IsDailyQuest(questId) or (not QuestieDB.IsRepeatable(questId));
    QuestieMap:UnloadQuestFrames(questId)

    if (QuestieMap.questIdFrames[questId]) then
        Questie:Error("Just removed all frames but the framelist seems to still be there!", questId)
    end

    QuestieTooltips:RemoveQuest(questId)
    QuestieTracker:RemoveQuest(questId)
    QuestieCombatQueue:Queue(function()
        QuestieTracker:Update()
    end)

    --This should probably be done first, because DrawAllAvailableQuests looks at QuestieMap.questIdFrames[QuestId] to add available
    QuestieQuest.CalculateAndDrawAvailableQuestsIterative()

    Questie:Debug(Questie.DEBUG_INFO, "[QuestieQuest] Completed Quest:", questId)
end
commented

It works!

commented

Perfect, will push the change soon.