fix: show learner secondary tooltips without spawns

This commit is contained in:
Xurkon
2026-06-12 23:17:56 -05:00
parent 2ef44eca15
commit fb3c78351f
3 changed files with 32 additions and 25 deletions
+1
View File
@@ -52,6 +52,7 @@
### Bug Fixes ### Bug Fixes
- **[Learner - Secondary Tooltip Without Spawn Coordinates]** Unit-hover learner tooltips now still open the secondary learner tooltip when the learner has confidence data but no recorded spawn coordinates yet. The normal unit tooltip suppression path also suppresses the old inline learner confidence line, so secondary mode no longer leaks learner-only lines back into the main tooltip.
- **[Map - Suppress Duplicate Native Quest POIs]** Rather than globally disabling the server/Blizzard objective POIs, Questie now keeps them enabled and hides only the individual Blizzard POI buttons for quests that already have a visible Questie POI (per-quest duplicate-POI suppression in `QuestieCompat`, hooked at init). Blizzard POIs still appear for quests Questie does not cover, but no longer stack on top of Questie's own objective icons. - **[Map - Suppress Duplicate Native Quest POIs]** Rather than globally disabling the server/Blizzard objective POIs, Questie now keeps them enabled and hides only the individual Blizzard POI buttons for quests that already have a visible Questie POI (per-quest duplicate-POI suppression in `QuestieCompat`, hooked at init). Blizzard POIs still appear for quests Questie does not cover, but no longer stack on top of Questie's own objective icons.
- **[Learner - Tooltips In Auto Mode]** Learner spawn tooltips now appear in Auto data-source mode, not only in learner-only mode, so learned spawn/quest detail still surfaces on hover while Auto is selected. - **[Learner - Tooltips In Auto Mode]** Learner spawn tooltips now appear in Auto data-source mode, not only in learner-only mode, so learned spawn/quest detail still surfaces on hover while Auto is selected.
- **[Prestige - Player Cache Reset]** The cached player level/race/class flags are now reset on prestige so available-quest eligibility recomputes against the new character state instead of stale pre-prestige values. - **[Prestige - Player Cache Reset]** The cached player level/race/class flags are now reset on prestige so available-quest eligibility recomputes against the new character state instead of stale pre-prestige values.
+29 -23
View File
@@ -4955,43 +4955,49 @@ local function _AddLearnedSpawnTooltipLine(unitToken)
end end
local entry = Questie.dbLearner.global.npcs[npcId] local entry = Questie.dbLearner.global.npcs[npcId]
if not entry or not entry[7] then if not entry then
_HideLearnerTooltipFrame() _HideLearnerTooltipFrame()
return return
end end
-- Find the first zone with spawn data local hasSpawnData = entry[7] ~= nil
local spawnsByZone = entry[7] local hasConfidenceData = entry.mc ~= nil
local zoneId = next(spawnsByZone) if not hasSpawnData and not hasConfidenceData then
if not zoneId then
_HideLearnerTooltipFrame() _HideLearnerTooltipFrame()
return return
end end
local zoneSpawns = spawnsByZone[zoneId]
if not zoneSpawns or #zoneSpawns == 0 then
_HideLearnerTooltipFrame()
return
end
-- Use the first recorded coordinate
local x = zoneSpawns[1][1]
local y = zoneSpawns[1][2]
local kills = entry.mc or 0 local kills = entry.mc or 0
local formattedX = ("%.1f"):format(x)
local formattedY = ("%.1f"):format(y)
local lines = {} local lines = {}
if Questie.db.profile.learnerTooltipShowSpawn ~= false then
local text = ("(%s, %s)"):format(formattedX, formattedY) if hasSpawnData then
if Questie.db.profile.learnerTooltipShowConfidence ~= false then -- Find the first zone with spawn data
text = text .. (" from %d kill%s"):format(kills, kills == 1 and "" or "s") local spawnsByZone = entry[7]
local zoneId = next(spawnsByZone)
local zoneSpawns = zoneId and spawnsByZone[zoneId]
if zoneSpawns and #zoneSpawns > 0 and Questie.db.profile.learnerTooltipShowSpawn ~= false then
-- Use the first recorded coordinate
local x = zoneSpawns[1][1]
local y = zoneSpawns[1][2]
local formattedX = ("%.1f"):format(x)
local formattedY = ("%.1f"):format(y)
local text = ("(%s, %s)"):format(formattedX, formattedY)
if Questie.db.profile.learnerTooltipShowConfidence ~= false then
text = text .. (" from %d kill%s"):format(kills, kills == 1 and "" or "s")
end
lines[#lines + 1] = {"Learned spawn", text}
end end
lines[#lines + 1] = {"Learned spawn", text}
end end
if Questie.db.profile.learnerTooltipShowTotalSpawns ~= false then if Questie.db.profile.learnerTooltipShowTotalSpawns ~= false then
lines[#lines + 1] = {"Total spawns learned", tostring(_CountLearnedNpcSpawns(entry))} local totalSpawns = _CountLearnedNpcSpawns(entry)
if totalSpawns > 0 then
lines[#lines + 1] = {"Total spawns learned", tostring(totalSpawns)}
end
end
if #lines == 0 and hasConfidenceData and Questie.db.profile.learnerTooltipShowConfidence ~= false then
lines[#lines + 1] = {"Learner confidence", tostring(kills)}
end end
if #lines == 0 then if #lines == 0 then
+2 -2
View File
@@ -447,7 +447,7 @@ if key:sub(1,2) == "m_" then
end end
end end
end end
if learnedNpc.mc and _LearnerTooltipsEnabled() and Questie.db.profile.learnerTooltipShowConfidence ~= false then if learnedNpc.mc and not suppressLearnerLines and _LearnerTooltipsEnabled() and Questie.db.profile.learnerTooltipShowConfidence ~= false then
tinsert(tooltipLines, "|cFF5EBAF3(Learned - Confidence: " .. tostring(learnedNpc.mc) .. ")|r") tinsert(tooltipLines, "|cFF5EBAF3(Learned - Confidence: " .. tostring(learnedNpc.mc) .. ")|r")
end end
end end
@@ -504,7 +504,7 @@ elseif key:sub(1,2) == "o_" then
end end
end end
end end
if learnedObj.mc and _LearnerTooltipsEnabled() and Questie.db.profile.learnerTooltipShowConfidence ~= false then if learnedObj.mc and not suppressLearnerLines and _LearnerTooltipsEnabled() and Questie.db.profile.learnerTooltipShowConfidence ~= false then
tinsert(tooltipLines, "|cFF5EBAF3(Learned - Confidence: " .. tostring(learnedObj.mc) .. ")|r") tinsert(tooltipLines, "|cFF5EBAF3(Learned - Confidence: " .. tostring(learnedObj.mc) .. ")|r")
end end
end end