From 66340740960b72c347eb94793a4e923c2a91e43b Mon Sep 17 00:00:00 2001 From: Xurkon Date: Mon, 8 Jun 2026 16:56:50 -0500 Subject: [PATCH] docs(learner): add regression-guard note at NPC spawn [7] strip Document why stripping [7] in InjectLearnedData is only safe because the guarded restore block below re-merges saved spawns (normalized to uiMapId). Prevents re-introducing bug 7ce0cdc (learner quests losing pins on /reload until the mob is re-killed). --- Modules/QuestieLearner.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Modules/QuestieLearner.lua b/Modules/QuestieLearner.lua index 58b6b17..1cde8bc 100644 --- a/Modules/QuestieLearner.lua +++ b/Modules/QuestieLearner.lua @@ -2755,8 +2755,14 @@ function QuestieLearner:InjectLearnedData() self:Sanitize(data) if not QuestieDB.npcDataOverrides[nid or npcId] then -- Spawn evidence is promoted through _MergeSpawnEvidence, where - -- AscensionDB ownership is known. Injecting [7] here runs too early - -- and can pollute curated plugin spawn tables. + -- AscensionDB ownership is known. Injecting [7] verbatim here runs too + -- early and can pollute curated plugin spawn tables. + -- REGRESSION NOTE (fix da5546f, was bug 7ce0cdc): stripping [7] here is + -- ONLY safe because the guarded restore block BELOW re-merges the saved + -- spawns (normalized to uiMapId). Do NOT delete that block or "simplify" + -- this to defer all spawns to _MergeSpawnEvidence — that promoter only + -- runs on LIVE kills, so prior-session spawns would never return on + -- /reload and learner quests (e.g. 8325 -> Mana Wyrm 15274) lose pins. QuestieDB.npcDataOverrides[nid or npcId] = CopyWithoutField(data, 7) npcCount = npcCount + 1 if data[1] then npcNameIndexNeedsRebuild = true end