diff --git a/CHANGELOG.md b/CHANGELOG.md index e3341df..8e366ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 11.0.2-20241003-2 + +* Added workaround for World Quest untracking causing taints. + ## 11.0.2-20241003-1 * Fixed incorrect call to ConfigModule:Get diff --git a/Modules/Workarounds/WorkaroundsModule.lua b/Modules/Workarounds/WorkaroundsModule.lua index 0c7ed5f..cd94ba8 100644 --- a/Modules/Workarounds/WorkaroundsModule.lua +++ b/Modules/Workarounds/WorkaroundsModule.lua @@ -102,9 +102,40 @@ local function WorkaroundMapTaints() end end +local function WorkaroundQuestTrackingTaints() + local lastTrackedQuestID = nil; + + function QuestUtil.TrackWorldQuest(questID, watchType) + if C_QuestLog.AddWorldQuestWatch(questID, watchType) then + if lastTrackedQuestID and lastTrackedQuestID ~= questID then + if C_QuestLog.GetQuestWatchType(lastTrackedQuestID) ~= Enum.QuestWatchType.Manual and watchType == Enum.QuestWatchType.Manual then + C_QuestLog.AddWorldQuestWatch(lastTrackedQuestID, Enum.QuestWatchType.Manual); -- Promote to manual watch + end + end + lastTrackedQuestID = questID; + end + + if watchType == Enum.QuestWatchType.Automatic then + local forceAllowTasks = true; + QuestUtil.CheckAutoSuperTrackQuest(questID, forceAllowTasks); + end + end + + function QuestUtil.UntrackWorldQuest(questID) + if C_QuestLog.RemoveWorldQuestWatch(questID) then + if lastTrackedQuestID == questID then + lastTrackedQuestID = nil; + end + end + + --ObjectiveTrackerManager:UpdateAll(); + end +end + function WorkaroundsModule:LoadWorkarounds(callback) if ConfigModule:Get("enableTaintWorkarounds") then WorkaroundMapTaints() + WorkaroundQuestTrackingTaints() end if callback then