DungeonPreQuest: mark dungeon quests too, refresh QuestieDB data

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-11-11 10:13:45 +00:00
parent 9d30c8fed8
commit 01a351a865
10 changed files with 628 additions and 70 deletions

View file

@ -108,6 +108,12 @@ local ns = {
[72] = { 2, 3, 1024 }, -- druids only (class 11)
[73] = { 1, 3, 0, 2, 3, 0, 1, 3, 0 }, -- two dungeons, one repeated
[74] = { 0, 3, 0 }, -- dungeon not known by name
[81] = { 2, 3, 0 }, -- also a dungeon quest itself
},
dungeonQuests = {
[80] = { 1, 1, 0 }, -- Alliance dungeon quest
[81] = { 1, 3, 0 },
[82] = { 0, 3, 0 }, -- dungeon not known by name
},
}
assert(loadfile(arg[1]))("DungeonPreQuest", ns)
@ -126,9 +132,15 @@ check(text(99) == nil, "unrelated quest gets no tooltip line")
check(text(73) == "Dungeon pre-quest: The Deadmines, Stratholme", "several dungeons, no repeats: " .. tostring(text(73)))
check(text(74) == "Dungeon pre-quest", "unknown dungeon still marks: " .. tostring(text(74)))
check(text(80) == "Dungeon quest: The Deadmines", "dungeon quest names its own dungeon: " .. tostring(text(80)))
check(text(81) == "Dungeon quest: The Deadmines\nDungeon pre-quest: Stratholme", "both kinds on separate lines: " .. tostring(text(81)))
check(text(82) == "Dungeon quest", "unknown own dungeon still marks: " .. tostring(text(82)))
check(text(70) ~= nil, "Alliance entry shows for Alliance")
faction = "Horde"
check(text(70) == nil, "Alliance entry hidden for Horde")
check(text(80) == nil, "Alliance dungeon quest hidden for Horde")
check(text(81) == "Dungeon quest: The Deadmines\nDungeon pre-quest: Stratholme", "shared quest shows for Horde")
faction = "Alliance"
classID = 1
@ -149,6 +161,11 @@ rows = { a, b }
hooks.QuestLogQuests_Update()
check(a.dpqMark and a.dpqMark.shown and a.dpqMark.text:find("D", 1, true), "pre-quest row is marked")
check(b.dpqMark == nil, "other row stays unmarked")
local own = button(80)
rows = { own }
hooks.QuestLogQuests_Update()
check(own.dpqMark and own.dpqMark.shown, "dungeon quest row is marked")
rows = { a, b }
check(a.dpqMark.text == "|cffc77dff[D]|r", "row uses the [D] tag: " .. tostring(a.dpqMark.text))
check(a.dpqMark.point[2] == a.Text and a.dpqMark.point[4] == 125, "mark sits just after the title: " .. tostring(a.dpqMark.point[4]))