From ee67653414282f86aa951352c77fcf21e5422473 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Tue, 9 Jun 2026 21:25:02 -0500 Subject: [PATCH] fix(learner): learner-only mode shows only learner-recorded spawns In learner-only mode the map/minimap drew curated AscensionDB (and static) spawns for every quest NPC/object the player had not personally recorded. GetNPC/GetObject fall back to the npcDataOverrides/objectDataOverrides entry for metadata when there is no learner record, and that entry's spawns (AscensionDB-curated for un-recorded entities) were drawn as pins. Both now track whether a real learner record exists and, in learner mode, strip spawns when it does not -- so learner-only shows exclusively what the learner recorded (metadata fallback for names/tooltips kept). GetObject also now nils the override in learner mode to match GetNPC. Recorded entities still show their learner spawns; auto/static/none unchanged. Verified test-neutral on the full suite (144 successes / same 7 pre-existing failures) with a local regression test that passes with the fix and fails without it. --- CHANGELOG.md | 1 + Database/QuestieDB.lua | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca9abf..d44279c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ ### Bug Fixes +- **[Learner - Learner-Only Mode No Longer Draws AscensionDB/Static Pins]** In learner-only mode the map/minimap drew curated AscensionDB (and static) spawns for every quest NPC/object the player had not personally recorded, instead of only the learner's own spawns. `QuestieDB:GetNPC`/`GetObject` fall back to the `npcDataOverrides`/`objectDataOverrides` entry for metadata when there is no learner record, and that entry's spawns (AscensionDB-curated for un-recorded entities) were being used as pins. Both functions now track whether a real learner record exists and, in learner mode, strip the spawns when it does not — so learner-only mode shows exclusively what the learner has recorded (the metadata fallback for names/tooltips is kept). Added a regression test. Recorded entities still show their learner spawns; auto/static/none modes are unchanged. - **[Map - Quest Type Filters Now Apply To Minimap]** (#11) Quest-type filters (Available Dungeon/Raid/PvP/Repeatable/Event Quests, plus other `ShouldBeHidden` rules like untracked/unexplored and `enableMiniMapIcons`) were honored on the world map but not the minimap. The world-map icon stayed hidden once `ShouldBeHidden` filtered it, but the minimap icon's per-frame `FadeLogic` re-showed any hidden icon as soon as the player came within range, so e.g. a filtered dungeon quest still appeared on the minimap. `FadeLogic` now re-checks `ShouldBeHidden` before re-showing, so the same filters apply to both maps (fixed in both the world-icon and manual-icon minimap fade paths). - **[Libs/AceComm - Long Comm Prefix Login Error]** (#12) Fixed a recurring login Lua error `AceComm:RegisterComm(...): prefix length is limited to 16 characters` on servers like ChromieCraft. The cause is a third-party addon (e.g. AtlasLoot) registering an AceComm prefix longer than the client's 16-character limit; because Questie's bundled AceComm is the LibStub winner and its `xpcall` polyfill wraps AceAddon's `OnEnable`, the upstream hard `error()` surfaced through Questie's frames every login. Our bundled `AceComm:RegisterComm` now degrades gracefully for over-long prefixes (which can never work on the client anyway): it warns once and skips the registration instead of throwing, so the offending addon's `OnEnable` is no longer aborted and the error popup is gone. - **[Tracker - VoiceOver questPlayButtons Nil Crash]** (#15) Fixed `attempt to index field 'questPlayButtons' (a nil value)` in `TrackerUtils:UpdateVoiceOverPlayButtons` and `TrackerLinePool.SetAllPlayButtonAlpha`. `TrackerUtils:IsVoiceOverLoaded` only checked that the VoiceOver addons were loaded, but some VoiceOver builds (seen on Elune) expose a `QuestOverlayUI` without a `questPlayButtons` table. It now also verifies `VoiceOver.QuestOverlayUI.questPlayButtons` exists; since every play-button call site gates on this function, the integration is now safely skipped instead of crashing on those builds. diff --git a/Database/QuestieDB.lua b/Database/QuestieDB.lua index 00edbed..9acec60 100644 --- a/Database/QuestieDB.lua +++ b/Database/QuestieDB.lua @@ -668,12 +668,20 @@ function QuestieDB:GetObject(objectId) local rawdata local override + local hasLearnerRecord = false override = QuestieDB.objectDataOverrides and (QuestieDB.objectDataOverrides[objectId] or QuestieDB.objectDataOverrides[tostring(objectId)]) if mode == "learner" or QuestieDB:IsStoreMissing("objectData") then rawdata = learnerRecord - if not rawdata then + if rawdata then + hasLearnerRecord = true + else + -- No learner record: fall back to the override only for metadata. Its spawns + -- are stripped below so learner-only mode never draws curated/static pins. rawdata = override end + -- Learner mode: discard curated coords AscensionDB wrote into objectDataOverrides + -- so learner data is used exclusively (mirrors GetNPC). + override = nil else rawdata = QuestieDB.QueryObject(objectId, QuestieDB._objectAdapterQueryOrder) if not rawdata and learnerRecord and mode == "auto" then @@ -710,6 +718,11 @@ function QuestieDB:GetObject(objectId) end end + -- Learner-only mode draws ONLY learner-recorded spawns (see GetNPC). + if mode == "learner" and not hasLearnerRecord then + obj.spawns = nil + end + _QuestieDB.objectCache[objectId] = obj; return obj; end @@ -2271,10 +2284,15 @@ function QuestieDB:GetNPC(npcId) local learnerRecord = _GetLearnerRecord("npcs", npcId) local rawdata local override + local hasLearnerRecord = false override = QuestieDB.npcDataOverrides and (QuestieDB.npcDataOverrides[npcId] or QuestieDB.npcDataOverrides[tostring(npcId)]) if mode == "learner" or QuestieDB:IsStoreMissing("npcData") then rawdata = learnerRecord - if not rawdata then + if rawdata then + hasLearnerRecord = true + else + -- No learner record: fall back to the override only for metadata (name, etc.). + -- Its spawns are stripped below so learner-only mode never draws curated/static pins. rawdata = override end -- Learner mode: discard any curated coords that AscensionDB's @@ -2348,6 +2366,13 @@ function QuestieDB:GetNPC(npcId) end end + -- Learner-only mode draws ONLY learner-recorded spawns. When this NPC has no learner + -- record, rawdata fell back to the curated/override entry purely for metadata; drop its + -- spawns so AscensionDB/static coordinates are not rendered as pins in learner mode. + if mode == "learner" and not hasLearnerRecord then + npc.spawns = nil + end + _QuestieDB.npcCache[npcId] = npc return npc end