fix: clear quest completion cache on refresh

This commit is contained in:
Xurkon
2026-06-12 21:40:23 -05:00
parent 60ed76598a
commit 9fa0164318
2 changed files with 44 additions and 0 deletions
+13
View File
@@ -720,9 +720,18 @@ end
-- Returns a list of quests the character has completed in its lifetime.
-- https://wowpedia.fandom.com/wiki/API_GetQuestsCompleted
local function ClearQuestCompleteTable(tbl)
if type(tbl) ~= "table" then return end
for key in pairs(tbl) do
tbl[key] = nil
end
end
function QuestieCompat.GetQuestsCompleted()
if not Questie.db.char.complete then
Questie.db.char.complete = {}
else
ClearQuestCompleteTable(Questie.db.char.complete)
end
QueryQuestsCompleted()
@@ -732,6 +741,10 @@ end
-- Fires when the data requested by QueryQuestsCompleted() is available.
-- https://wowpedia.fandom.com/wiki/QUEST_QUERY_COMPLETE
function QuestieCompat:QUEST_QUERY_COMPLETE(event)
if not Questie.db.char.complete then
Questie.db.char.complete = {}
end
ClearQuestCompleteTable(Questie.db.char.complete)
GetQuestsCompleted(Questie.db.char.complete)
local questId = next(Questie.db.char.complete)