fix: show learner secondary tooltips without spawns
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
+23
-17
@@ -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
|
||||||
|
|
||||||
|
local hasSpawnData = entry[7] ~= nil
|
||||||
|
local hasConfidenceData = entry.mc ~= nil
|
||||||
|
if not hasSpawnData and not hasConfidenceData then
|
||||||
|
_HideLearnerTooltipFrame()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local kills = entry.mc or 0
|
||||||
|
local lines = {}
|
||||||
|
|
||||||
|
if hasSpawnData then
|
||||||
-- Find the first zone with spawn data
|
-- Find the first zone with spawn data
|
||||||
local spawnsByZone = entry[7]
|
local spawnsByZone = entry[7]
|
||||||
local zoneId = next(spawnsByZone)
|
local zoneId = next(spawnsByZone)
|
||||||
if not zoneId then
|
local zoneSpawns = zoneId and spawnsByZone[zoneId]
|
||||||
_HideLearnerTooltipFrame()
|
if zoneSpawns and #zoneSpawns > 0 and Questie.db.profile.learnerTooltipShowSpawn ~= false then
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local zoneSpawns = spawnsByZone[zoneId]
|
|
||||||
if not zoneSpawns or #zoneSpawns == 0 then
|
|
||||||
_HideLearnerTooltipFrame()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Use the first recorded coordinate
|
-- Use the first recorded coordinate
|
||||||
local x = zoneSpawns[1][1]
|
local x = zoneSpawns[1][1]
|
||||||
local y = zoneSpawns[1][2]
|
local y = zoneSpawns[1][2]
|
||||||
local kills = entry.mc or 0
|
|
||||||
|
|
||||||
local formattedX = ("%.1f"):format(x)
|
local formattedX = ("%.1f"):format(x)
|
||||||
local formattedY = ("%.1f"):format(y)
|
local formattedY = ("%.1f"):format(y)
|
||||||
local lines = {}
|
|
||||||
if Questie.db.profile.learnerTooltipShowSpawn ~= false then
|
|
||||||
local text = ("(%s, %s)"):format(formattedX, formattedY)
|
local text = ("(%s, %s)"):format(formattedX, formattedY)
|
||||||
if Questie.db.profile.learnerTooltipShowConfidence ~= false then
|
if Questie.db.profile.learnerTooltipShowConfidence ~= false then
|
||||||
text = text .. (" from %d kill%s"):format(kills, kills == 1 and "" or "s")
|
text = text .. (" from %d kill%s"):format(kills, kills == 1 and "" or "s")
|
||||||
end
|
end
|
||||||
lines[#lines + 1] = {"Learned spawn", text}
|
lines[#lines + 1] = {"Learned spawn", text}
|
||||||
end
|
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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user