Created
September 24, 2022 23:20
-
-
Save tywtyw2002/05bde78cffdf59218c7e1c595c3fff07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- QuestLog.lua 2022-09-20 11:47:48.000000000 -0600 | |
+++ QuestLog.lua 2022-09-24 17:13:12.000000000 -0600 | |
@@ -44,6 +44,25 @@ | |
end | |
end | |
+local function CleanZombieQuests() | |
+ local numEntries, _ = GetNumQuestLogEntries() | |
+ if KT_GetNumQuestWatches() > 0 then | |
+ local questIds = {} | |
+ for i=1, numEntries do | |
+ local _, _, _, isHeader, _, _, _, questID, _, _, _, _, isTask, isBounty = GetQuestLogTitle(i) | |
+ if not isHeader and not isTask and not isBounty then | |
+ questIds[questID] = true | |
+ end | |
+ end | |
+ -- do clean | |
+ for k, quest in ipairs(dbChar.trackedQuests) do | |
+ if not questIds[quest.id] then | |
+ tremove(dbChar.trackedQuests, k) | |
+ end | |
+ end | |
+ end | |
+end | |
+ | |
local function SetHooks() | |
-- Quest Log ------------------------------------------------------------------------------------------------------- | |
@@ -125,6 +144,7 @@ | |
_DBG("|cffffff00Init|r - "..self:GetName(), true) | |
db = KT.db.profile | |
dbChar = KT.db.char | |
+ CleanZombieQuests() | |
end | |
function M:OnEnable() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment