fix: prevent minimap fade from hiding icons

This commit is contained in:
Xurkon
2026-06-12 18:00:25 -05:00
parent 5c7c63bc18
commit 803904d6ba
2 changed files with 12 additions and 4 deletions
+1
View File
@@ -41,6 +41,7 @@
### Bug Fixes
- **[Map - Minimap Fade No Longer Hides Icons]** (#17) Distance-based minimap fading now clamps to the configured faded-icon opacity floor instead of reaching 0 alpha. The fade distance can visually de-emphasize distant icons, but only the range cutoff can remove them from the minimap.
- **[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.
+11 -4
View File
@@ -79,6 +79,15 @@ local function _ShouldMinimapIconBeHidden(icon, forceRefresh)
return icon._lastShouldBeHiddenResult
end
local function _GetMinimapDistanceFade(distance, profile)
local fade = 1 - (math.min(fadeOverDistance, (distance - profile.fadeLevel)) * normalizedValue)
local minimumFade = profile.iconFadeLevel or 0.3
if fade < minimumFade then
return minimumFade
end
return fade
end
local isDrawQueueDisabled = false
--* TODO: How the frames are handled needs to be reworked, why are we getting them from _G
@@ -733,8 +742,7 @@ function QuestieMap:DrawManualIcon(data, areaID, x, y, typ)
self:FakeShow()
end
elseif (distance > profile.fadeLevel) then
local fade = 1 - (math.min(10, (distance - profile.fadeLevel)) * normalizedValue)
self:SetFade(fade)
self:SetFade(_GetMinimapDistanceFade(distance, profile))
elseif (distance < profile.fadeOverPlayerDistance) and profile.fadeOverPlayer then
local fadeAmount = profile.fadeOverPlayerLevel + distance * (1 - profile.fadeOverPlayerLevel) / profile.fadeOverPlayerDistance
if self.faded and fadeAmount > profile.iconFadeLevel then
@@ -911,8 +919,7 @@ function QuestieMap:DrawWorldIcon(data, areaID, x, y, showFlag)
self:FakeShow()
end
elseif (distance > profile.fadeLevel) then
local fade = 1 - (math.min(10, (distance - profile.fadeLevel)) * normalizedValue);
self:SetFade(fade)
self:SetFade(_GetMinimapDistanceFade(distance, profile))
elseif (distance < profile.fadeOverPlayerDistance) and profile.fadeOverPlayer then
local fadeAmount = profile.fadeOverPlayerLevel + distance * (1 - profile.fadeOverPlayerLevel) / profile.fadeOverPlayerDistance
if self.faded and fadeAmount > profile.iconFadeLevel then