diff --git a/CHANGELOG.md b/CHANGELOG.md index 81cd1e7..c74fb90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## v1.6.1 (2026-05-04) + +### Bug Fixes + +- **[Fix — Map Icon Completion]** Resolved a bug where quest objective icons (map pins and minimap markers) persisted on the world map and minimap after objectives were fulfilled, only disappearing after speaking to the quest giver to complete the quest. + - **SpecialObjectives Dirty Flag**: Added a missing loop in `SetObjectivesDirty` to reset `isUpdated = false` on `quest.SpecialObjectives` alongside the existing `quest.Objectives` loop. Previously, special objectives (e.g. demonic runestones, portal-closing mechanics) would skip the `ObjectiveUpdate` early-exit guard because their `isUpdated` flag was never cleared, preventing `objective.Completed` from being set to `true` and leaving map icons on-screen indefinitely. + - **Completion Guard in PopulateObjective**: Added a defensive check in `PopulateObjective` so that objectives without an `Update` function still unload their spawned icons if `objective.Completed` or `quest.isComplete` is already `true` from a prior update cycle. + ## Session 34 (2026-05-02) ### Maintenance diff --git a/Modules/Quest/QuestieQuest.lua b/Modules/Quest/QuestieQuest.lua index 841f669..ccf82f3 100644 --- a/Modules/Quest/QuestieQuest.lua +++ b/Modules/Quest/QuestieQuest.lua @@ -802,6 +802,15 @@ function QuestieQuest:SetObjectivesDirty(questId) objective.isUpdated = false objKey, objective = next(quest.Objectives, objKey) end + -- Also dirty SpecialObjectives (e.g. demonic runestones, portal-closing mechanics). + -- Without this, ObjectiveUpdate's isUpdated early-exit prevents objective.Completed + -- from being set to true, so _UnloadAlreadySpawnedIcons is never reached and icons + -- linger on the map/minimap after the objectives are fulfilled. + local soKey, sObjective = next(quest.SpecialObjectives or {}) + while soKey do + sObjective.isUpdated = false + soKey, sObjective = next(quest.SpecialObjectives, soKey) + end end end @@ -1336,7 +1345,14 @@ function QuestieQuest:PopulateObjective(quest, objectiveIndex, objective, blockI Questie:Debug(Questie.DEBUG_INFO, "[QuestieQuest:PopulateObjective]", objective.Description) if (not objective.Update) then - Questie:Debug(Questie.DEBUG_INFO, "[QuestieQuest:PopulateObjective] - Quest is already updated. --> Exiting!") + -- No Update function means static/pre-populated objective. + -- Still check completion state so icons are removed if this objective was + -- already marked complete from a previous update cycle. + if objective.Completed or quest.isComplete then + Questie:Debug(Questie.DEBUG_INFO, + "[QuestieQuest:PopulateObjective] - No Update fn but objective is complete, unloading icons.") + _UnloadAlreadySpawnedIcons(objective) + end return end diff --git a/Questie-X.toc b/Questie-X.toc index 6740784..73cba8b 100644 --- a/Questie-X.toc +++ b/Questie-X.toc @@ -11,7 +11,7 @@ ## Notes-esES: Ayundante de misión ## Notes-ptBR: Ajudante de missão ## Notes-frFR: Assistant de quête -## Version: 1.6.0 +## Version: 1.6.1 ## OptionalDeps: Ace3, CallbackHandler-1.0, HereBeDragons, LibDataBroker-1.1, LibDBIcon-1.0, LibSharedMedia-3.0, LibStub, LibUIDropDownMenu, Questie-X-WotLKDB, Questie-X-ClassicDB, Questie-X-TBCDB, Questie-X-TurtleDB, Questie-X-AscensionDB, Questie-X-EbonholdDB ## SavedVariables: QuestieConfig, QuestieLearnerDB, QuestieCacheDB, QuestieJourneyDB ## SavedVariablesPerCharacter: QuestieConfigCharacter diff --git a/docs/changelog.html b/docs/changelog.html index 3f14f21..ca10057 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -169,13 +169,25 @@
Complete history of changes, fixes, and additions.
SetObjectivesDirty to reset isUpdated = false on quest.SpecialObjectives alongside the existing quest.Objectives loop. Previously, special objectives (e.g. demonic runestones, portal-closing mechanics) would skip the ObjectiveUpdate early-exit guard because their isUpdated flag was never cleared, preventing objective.Completed from being set to true and leaving map icons on-screen indefinitely.PopulateObjective so that objectives without an Update function still unload their spawned icons if objective.Completed or quest.isComplete is already true from a prior update cycle.