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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user