diff --git a/CHANGELOG.md b/CHANGELOG.md index d39bb0f..a836d60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ ### Bug Fixes +- **[Quest - Re-accepted (Prestige) Quest Stuck "Complete", No Turn-In '?']** A quest completed in a previous Ascension prestige stays in `Questie.db.char.complete`; when re-accepted it is active again in the log, but the stale completion flag was never cleared. `AddFinisher` only draws the turn-in `?` when `not char.complete[questId]`, so the finisher was suppressed and the quest mislabelled "(Complete)" with stale objective text, even while standing at the turn-in NPC. An active in-log quest is now kept out of `char.complete` in two places: it is cleared in `QuestieQuest:AcceptQuest` on accept, and the asynchronous `QUEST_QUERY_COMPLETE` handler now also strips any quest currently in the player's log (so the server's completed list can't re-flag a re-accepted quest). The turn-in `?` and normal objective tracking are restored. - **[Map - Completed Quests Still Shown As Available]** (#7) The server's completed-quest list is delivered asynchronously (the `QUEST_QUERY_COMPLETE` event), often after available quests were first drawn — so quests that were actually already complete kept showing as available `!` until something forced a redraw (e.g. `/reload`). Questie now recalculates available quests once `char.complete` is populated by that event, removing the completed ones. This also clears the "already completed" subset of the false-available pins reported in #8. - **[Map - Available '!' Lingered On Minimap For Accepted Quests]** (#9) When a quest was accepted, its available `!` icon could remain on the minimap until a `/reload`. `QuestieMap:UnloadQuestFramesByDataType` unloaded the frame but left its name in the frame registry and `_G`, so the minimap icon was not fully torn down. It now removes the registry/global reference as well, so the available icon is cleared immediately on accept for both the map and minimap. diff --git a/Compat/Compat.lua b/Compat/Compat.lua index e78705a..c667166 100644 --- a/Compat/Compat.lua +++ b/Compat/Compat.lua @@ -734,9 +734,15 @@ end function QuestieCompat:QUEST_QUERY_COMPLETE(event) GetQuestsCompleted(Questie.db.char.complete) + local currentQuestlog = QuestiePlayer and QuestiePlayer.currentQuestlog local questId = next(Questie.db.char.complete) while questId do - if QuestieDB.IsRepeatable(questId) then + -- Repeatable quests are never "complete" for availability purposes. + -- Also: a quest currently in the player's log is active, not turned in — the server's + -- completed list can still report a quest re-accepted after an Ascension prestige, and + -- that stale flag suppresses the turn-in '?' finisher and mislabels it "(Complete)". + -- Keep char.complete and the live quest log mutually exclusive. + if QuestieDB.IsRepeatable(questId) or (currentQuestlog and currentQuestlog[questId]) then Questie.db.char.complete[questId] = nil end questId = next(Questie.db.char.complete, questId) diff --git a/Modules/Quest/QuestieQuest.lua b/Modules/Quest/QuestieQuest.lua index 78b3193..ac4ee7c 100644 --- a/Modules/Quest/QuestieQuest.lua +++ b/Modules/Quest/QuestieQuest.lua @@ -500,6 +500,15 @@ function QuestieQuest:AcceptQuest(questId) -- shows again (covers re-doing the quest after abandon or an Ascension prestige). QuestieQuest:ClearLootedSpawns(questId) + -- An accepted quest is active, NOT completed-and-turned-in. On Ascension a quest + -- completed in a previous prestige stays in char.complete; when re-accepted the stale + -- flag made Questie treat it as done — the turn-in '?' finisher was suppressed + -- (AddFinisher requires `not char.complete[questId]`) and it showed "(Complete)". + -- Clear it so the quest tracks/finishes normally again. + if Questie.db.char.complete then + Questie.db.char.complete[questId] = nil + end + -- If any of these flags exist, this quest was previously accepted and may -- have stale completion state (e.g. complete-then-abandon-then-reaccept leaves -- quest.isComplete=true, WasComplete=true). Only check quest-object flags