fix(quest): clear stale char.complete for re-accepted (prestige) quests

A quest completed in a prior Ascension prestige stays in char.complete.
On re-accept it is active in the log again, but the stale completion flag
was never cleared — and AddFinisher only draws the turn-in '?' when
not char.complete[questId]. So the finisher was suppressed and the quest
showed '(Complete)' with stale objective text while standing at the
turn-in NPC (e.g. Aggression 8334 at Lanthan Perilon 15281).

An active in-log quest is now kept out of char.complete:
- QuestieQuest:AcceptQuest clears char.complete[questId] on accept.
- The async QUEST_QUERY_COMPLETE handler also strips any quest currently
  in QuestiePlayer.currentQuestlog, so the server's completed list can't
  re-flag a re-accepted quest.

Restores the turn-in '?' and normal objective tracking. selene 0 errors;
busted 145 successes / same 7 pre-existing failures.
This commit is contained in:
Xurkon
2026-06-10 04:58:44 -05:00
parent ab560d5711
commit f9ff77c088
3 changed files with 17 additions and 1 deletions
+1
View File
@@ -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.
+7 -1
View File
@@ -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)
+9
View File
@@ -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