diff --git a/CHANGELOG.md b/CHANGELOG.md index d67ccd6..11002f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ ### Bug Fixes +- **[Regression Tests - Learner Spawn And Tooltip Fallback]** Fixed the two previously failing specs: AscensionDB-owned NPC spawn overrides now keep their curated coordinates even in learner mode, preventing stale learner zones from leaking wrong-corner pins; and NPC quest-start tooltip fallback now calls `QuestieDB:GetQuest` correctly so objective summary text appears when no live objective tooltip is registered. - **[Performance - Minimap Filter And Learner Kill Hot Paths]** (#20) Reduced two likely stutter sources introduced after 1.6.2: minimap fade passes now cache expensive quest-filter visibility checks for already-visible icons instead of re-running them every 0.1s per icon, while still forcing a fresh check before hidden icons reappear; and the learner kill path no longer runs the spawn-evidence merge scan before the merger's three-evidence minimum can succeed. - **[Map Tooltip - Objective Progress Refresh]** (#18) Minimap and world-map objective pin tooltips now refresh the underlying objective before rendering progress text, so kill counters update on hover instead of staying at the count captured when the pin was drawn. - **[Learner - Stop Recording Bystander Kills As Your Own]** Kills of mobs you never engaged (other players killing nearby mobs) were being recorded as spawns at *your* position and inflating the kill count. The combat-log handler passed `px,py=nil` to `LearnNPC` for uncredited kills, whose `GetPlayerCoords` fallback then stored your location as the mob's spawn. Spawn recording (`LearnNPC` + GUID evidence) is now gated on a captured position, so only credited kills (your own / party kills you engaged, where a real position was captured) store a spawn. Bystander kills no longer pollute the learner with your coordinates or inflate the count; the NPC's name/quest data is still learned via mouseover/target. diff --git a/Database/QuestieDB.lua b/Database/QuestieDB.lua index bfef8ee..d3471e0 100644 --- a/Database/QuestieDB.lua +++ b/Database/QuestieDB.lua @@ -2392,15 +2392,17 @@ function QuestieDB:GetNPC(npcId) local override local hasLearnerRecord = false override = QuestieDB.npcDataOverrides and (QuestieDB.npcDataOverrides[npcId] or QuestieDB.npcDataOverrides[tostring(npcId)]) + local ascensionOwnsSpawns = QuestieDB.ascensionOverrideKeys + and QuestieDB.ascensionOverrideKeys["NPC"] + and QuestieDB.ascensionOverrideKeys["NPC"][npcId] + and QuestieDB.ascensionOverrideKeys["NPC"][npcId][7] + local curatedSpawnOverride = override if mode == "learner" or QuestieDB:IsStoreMissing("npcData") then rawdata = learnerRecord if rawdata then hasLearnerRecord = true if override and (type(rawdata[7]) ~= "table" or next(rawdata[7]) == nil) - and not (QuestieDB.ascensionOverrideKeys - and QuestieDB.ascensionOverrideKeys["NPC"] - and QuestieDB.ascensionOverrideKeys["NPC"][npcId] - and QuestieDB.ascensionOverrideKeys["NPC"][npcId][7]) then + and not ascensionOwnsSpawns then local overrideSpawns = override[7] or override.spawns if type(overrideSpawns) == "table" and next(overrideSpawns) then local mergedRawdata = {} @@ -2467,10 +2469,8 @@ function QuestieDB:GetNPC(npcId) -- AscensionDB has no entry to displace it — this check removes it. Direct -- ascensionOverrideKeys lookup (NOT IsAscensionProtected, which returns false -- in learner mode). - if override and QuestieDB.ascensionOverrideKeys and QuestieDB.ascensionOverrideKeys["NPC"] - and QuestieDB.ascensionOverrideKeys["NPC"][npcId] - and QuestieDB.ascensionOverrideKeys["NPC"][npcId][7] then - local curated = override[7] or override.spawns + if ascensionOwnsSpawns and curatedSpawnOverride then + local curated = curatedSpawnOverride[7] or curatedSpawnOverride.spawns if curated and next(curated) then npc.spawns = CopySpawnTable(curated) end diff --git a/Modules/Tooltips/Tooltip.lua b/Modules/Tooltips/Tooltip.lua index e723878..c0ad925 100644 --- a/Modules/Tooltips/Tooltip.lua +++ b/Modules/Tooltips/Tooltip.lua @@ -95,7 +95,7 @@ local function _GetQuestObjectiveSummary(questId) return nil end - local quest = QuestieDB.GetQuest(questId) + local quest = QuestieDB:GetQuest(questId) if not quest or not quest.ObjectiveData then return nil end