Skip to content

Commit

Permalink
Blacklist pre-Cata event quests
Browse files Browse the repository at this point in the history
- Show heroic daily dungeon quests (removed in patch 3.3)
  • Loading branch information
widxwer committed Jul 27, 2024
1 parent 73c82e9 commit 47e58c0
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 6 deletions.
26 changes: 20 additions & 6 deletions Compat/Compat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ local QuestieMenu = QuestieLoader:ImportModule("QuestieMenu")
local QuestieTooltips = QuestieLoader:ImportModule("QuestieTooltips")
---@class QuestieNameplate
local QuestieNameplate = QuestieLoader:ImportModule("QuestieNameplate")

---@type QuestieCorrections
local QuestieCorrections = QuestieLoader:ImportModule("QuestieCorrections")

-- addon/folder name
QuestieCompat.addonName = ...
Expand Down Expand Up @@ -506,7 +507,6 @@ function QuestieCompat.ResetDailyQuests(reset)
local currentTime = QuestieCompat.GetServerTime()

if reset or (currentTime > Questie.db.profile.dailyResetTime) then
print("[ResetDailyQuests]")
for questId in pairs(Questie.db.char.daily) do
Questie.db.char.daily[questId] = nil
Questie.db.char.complete[questId] = nil
Expand All @@ -530,7 +530,6 @@ function QuestieCompat.ResetWeeklyQuests()
end

weeklyResetTimer = weeklyResetTimer or QuestieCompat.C_Timer.After(timeUntilReset, function()
print("[ResetWeeklyQuests]")
for questId in pairs(Questie.db.char.weekly) do
Questie.db.char.weekly[questId] = nil
Questie.db.char.complete[questId] = nil
Expand Down Expand Up @@ -1592,12 +1591,27 @@ function QuestieCompat.LoadCorrections(_LoadCorrections, validationTables)
end
end

function QuestieCompat.Merge(target, source)
local blacklistRegistry = {}

function QuestieCompat.RegisterBlacklist(blName, blacklist)
blacklistRegistry[blName] = blacklistRegistry[blName] or {}
table.insert(blacklistRegistry[blName], blacklist)
end

function QuestieCompat.LoadBlacklists()
for blName in pairs(blacklistRegistry) do
for _, blacklist in ipairs(blacklistRegistry[blName]) do
QuestieCompat.Merge(QuestieCorrections[blName], blacklist(), true)
end
end
end

function QuestieCompat.Merge(target, source, override)
if type(target) ~= "table" then target = {} end
for k,v in pairs(source) do
if type(v) == "table" then
target[k] = QuestieCompat.Merge(target[k], v)
elseif target[k] == nil then
target[k] = QuestieCompat.Merge(target[k], v, override)
elseif target[k] == nil or override then
target[k] = v
end
end
Expand Down
45 changes: 45 additions & 0 deletions Compat/Corrections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,49 @@ QuestieCompat.RegisterCorrection("npcData", function()
[npcKeys.name] = "Lord Afrasastrasz",
},
}
end)

QuestieCompat.RegisterBlacklist("hiddenQuests", function()
return {
-- "Zalazane's Fall" event quests
[25444] = true, --* Da Perfect Spies (https://www.wowhead.com/wotlk/quest=25444) (Retail Data)
[25445] = true, --* Zalazane's Fall (https://www.wowhead.com/wotlk/quest=25445) (Retail Data)
[25446] = true, --* Frogs Away! (https://www.wowhead.com/wotlk/quest=25446) (Retail Data)
[25461] = true, --* Trollin' For Volunteers (https://www.wowhead.com/wotlk/quest=25461) (Retail Data)
[25470] = true, --* Lady Of Da Tigers (https://www.wowhead.com/wotlk/quest=25470) (Retail Data)
[25480] = true, --* Dance Of De Spirits (https://www.wowhead.com/wotlk/quest=25480) (Retail Data)
[25495] = true, --* Preparin' For Battle (https://www.wowhead.com/wotlk/quest=25495) (Retail Data)

-- "Operation: Gnomeregan" event quests
[25199] = true, --* Basic Orders (https://www.wowhead.com/wotlk/quest=25199) (Retail Data)
[25212] = true, --* Vent Horizon (https://www.wowhead.com/wotlk/quest=25212) (Retail Data)
[25229] = true, --* A Few Good Gnomes (https://www.wowhead.com/wotlk/quest=25229) (Retail Data)
[25283] = true, --* Prepping the Speech (https://www.wowhead.com/wotlk/quest=25283) (Retail Data)
[25285] = true, --* In and Out (https://www.wowhead.com/wotlk/quest=25285) (Retail Data)
[25286] = true, --* Words for Delivery (https://www.wowhead.com/wotlk/quest=25286) (Retail Data)
[25287] = true, --* Words for Delivery (https://www.wowhead.com/wotlk/quest=25287) (Retail Data)
[25289] = true, --* One Step Forward... (https://www.wowhead.com/wotlk/quest=25289) (Retail Data)
[25295] = true, --* Press Fire (https://www.wowhead.com/wotlk/quest=25295) (Retail Data)
[25393] = true, --* Operation: Gnomeregan (https://www.wowhead.com/wotlk/quest=25393) (Retail Data)
[25500] = true, --* Words for Delivery (https://www.wowhead.com/wotlk/quest=25500) (Retail Data)

-- heroic daily dungeon quests
[13240] = false, --* Timear Foresees Centrifuge Constructs in your Future! (https://www.wowhead.com/wotlk/quest=13240) (Retail Data)
[13241] = false, --* Timear Foresees Ymirjar Berserkers in your Future! (https://www.wowhead.com/wotlk/quest=13241) (Retail Data)
[13243] = false, --* Timear Foresees Infinite Agents in your Future! (https://www.wowhead.com/wotlk/quest=13243) (Retail Data)
[13244] = false, --* Timear Foresees Titanium Vanguards in your Future! (https://www.wowhead.com/wotlk/quest=13244) (Retail Data)
[13245] = false, --* Proof of Demise: Ingvar the Plunderer (https://www.wowhead.com/wotlk/quest=13245) (Retail Data)
[13246] = false, --* Proof of Demise: Keristrasza (https://www.wowhead.com/wotlk/quest=13246) (Retail Data)
[13247] = false, --* Proof of Demise: Ley-Guardian Eregos (https://www.wowhead.com/wotlk/quest=13247) (Retail Data)
[13248] = false, --* Proof of Demise: King Ymiron (https://www.wowhead.com/wotlk/quest=13248) (Retail Data)
[13249] = false, --* Proof of Demise: The Prophet Tharon'ja (https://www.wowhead.com/wotlk/quest=13249) (Retail Data)
[13250] = false, --* Proof of Demise: Gal'darah (https://www.wowhead.com/wotlk/quest=13250) (Retail Data)
[13251] = false, --* Proof of Demise: Mal'Ganis (https://www.wowhead.com/wotlk/quest=13251) (Retail Data)
[13252] = false, --* Proof of Demise: Sjonnir The Ironshaper (https://www.wowhead.com/wotlk/quest=13252) (Retail Data)
[13253] = false, --* Proof of Demise: Loken (https://www.wowhead.com/wotlk/quest=13253) (Retail Data)
[13254] = false, --* Proof of Demise: Anub'arak (https://www.wowhead.com/wotlk/quest=13254) (Retail Data)
[13255] = false, --* Proof of Demise: Herald Volazj (https://www.wowhead.com/wotlk/quest=13255) (Retail Data)
[13256] = false, --* Proof of Demise: Cyanigosa (https://www.wowhead.com/wotlk/quest=13256) (Retail Data)
[14199] = false, --* Proof of Demise: The Black Knight (https://www.wowhead.com/wotlk/quest=14199) (Retail Data)
}
end)
2 changes: 2 additions & 0 deletions Database/Corrections/QuestieCorrections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ do
end
end

if QuestieCompat.Is335 then QuestieCompat.LoadBlacklists() end

if Questie.db.profile.showEventQuests then
C_Timer.After(1, function()
-- This is done with a delay because on startup the Blizzard API seems to be
Expand Down

1 comment on commit 47e58c0

@Sattva-108
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty

Please sign in to comment.