Skip to content

Commit

Permalink
Merge pull request #79 from GurliGebis/bugfixes
Browse files Browse the repository at this point in the history
Added workaround for World Quest untracking causing taints
  • Loading branch information
GurliGebis authored Oct 3, 2024
2 parents eff3f47 + f4f91fa commit 122d109
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
31 changes: 31 additions & 0 deletions Modules/Workarounds/WorkaroundsModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 122d109

Please sign in to comment.