fix(available): clean up pin and tooltip when quest enters quest log

In _CalculateAvailableQuests, when a quest is found in the quest log
(IsComplete ~= -1), explicitly unload any available-quest pin frame
for that questId, remove its tooltip, and clear the cached entry
before returning.

Previously the early-return left stale state behind: the pin frame
and tooltip would persist until the next sweep, causing a brief window
where the same quest was visible as both 'available' (yellow !) on
the map and 'in log' (yellow ?) in the quest log.

The cleanup order is correct: unload frame, then remove tooltip,
then clear cache. narrow scope (only 'available' data type) — does
not affect other pin categories.
This commit is contained in:
Xurkon
2026-06-01 18:13:26 -05:00
parent df7b5cff3e
commit 515b1b2b33
+3
View File
@@ -153,6 +153,9 @@ _CalculateAvailableQuests = function()
_DrawChildQuests(questId, currentQuestlog, completedQuests)
if QuestieDB.IsComplete(questId) ~= -1 then -- The quest in the quest log is not failed, so we don't show it as available
QuestieMap:UnloadQuestFramesByDataType(questId, "available")
QuestieTooltips:RemoveQuest(questId)
availableQuests[questId] = nil
return
end
end