fix(map): proactively hide filtered quest icons on the minimap (#11)

FadeLogic only re-checked ShouldBeHidden when deciding whether to
re-show an already-hidden icon, so a filtered quest (e.g. a dungeon
quest) that was already visible -- or that HBD's pin renderer showed on
coming into range -- was never hidden on the minimap while the world map
hid it. FadeLogic now proactively FakeHides any in-range icon whose
ShouldBeHidden is true, in both minimap fade paths; the second path also
gains the #17 minimap-radius cutoff gating it was missing.
This commit is contained in:
Xurkon
2026-06-10 21:31:41 -05:00
parent 0ebfb51ded
commit 5e4ac2d64c
2 changed files with 35 additions and 3 deletions
+1
View File
@@ -40,6 +40,7 @@
### Bug Fixes
- **[Map - Quest-Type Filters Now Truly Apply To The Minimap]** (#11) Filtered quest types (e.g. dungeon quests) could still show on the minimap while correctly hidden on the world map. The previous fix made the minimap `FadeLogic` re-check `ShouldBeHidden` only when deciding whether to *re-show* an already-hidden icon — so an icon that was already visible (or that HBD's pin renderer showed on coming into range) was never hidden. `FadeLogic` now proactively calls `ShouldBeHidden` for every in-range minimap icon and `FakeHide`s it when filtered, in both minimap fade paths (quest icons and townsfolk/manual icons). The same path also picked up the #17 minimap-radius cutoff gating it was missing.
- **[Learner - Capture Spawn Coordinates Reliably (Fixes Disappearing Pins)]** The learner's `GetPlayerCoords` used the raw `GetPlayerMapPosition("player")`, which returns `0,0` whenever the world map isn't set to the player's current zone (the usual case — the map is closed or showing another zone) and mis-reports on Ascension subzones like Sunstrider Isle. So kill/mouseover learn events captured no position: NPCs were saved with `spawnSource="fallback"` and no `[7]` spawns, and in learner-only mode their pins never persisted (showing only briefly after a live kill, then disappearing on the next redraw/reload). It now reads position from `HBD:GetPlayerZonePosition()` — the robust `SetMapToCurrentZone()`/Sunstrider-corrected path, cached for cheap per-kill calls — falling back to the old API only if HBD is unavailable. Newly encountered mobs now record real coordinates so their learner pins persist.
- **[Map - Minimap Icon Pixel Snapping At Fractional Scales]** (#6) Minimap quest icons are now snapped to the physical pixel grid when positioned. At fractional UI scales (e.g. a 0.71 game scale combined with Windows display scaling) the raw fractional offset placed icons between physical pixels, making them render blurry and visibly offset from the engine-drawn native quest blips. Rounding the pin offset to a whole physical pixel (via the minimap's effective scale) keeps Questie's icons on the same grid as the native markers, improving alignment at non-integer scales.
- **[Map - Hide Callboard Quests: Robust Board Detection]** (#10) The "hide repeatable quests below level 60" option only hid quests flagged repeatable in the DB, but Ascension's Call Board / Contract Board bounties (e.g. NPC 24 "Outlaw's Contract Board") aren't reliably flagged repeatable, so their `!` markers still showed. Added `QuestieDB.IsBoardQuest(questId)` which detects these by their starter NPC/object name containing "board" (cached per quest), and the hide-below-60 option now hides a quest when it is repeatable **or** a board quest — closing the gap in both the available-quest draw path and the icon visibility check.
+34 -3
View File
@@ -656,6 +656,21 @@ function QuestieMap:DrawManualIcon(data, areaID, x, y, typ)
y = self.worldY
end
if (x and y) then
-- Proactively hide any minimap icon that should be filtered out, even if it
-- is currently shown. The quest-type / map filters (showDungeonQuests,
-- enableMiniMapIcons, hideUntracked, hide-repeatable-below-60, etc.) can be
-- true when the icon was first drawn, or HBD's pin renderer may have shown it
-- on coming into range. Previously FadeLogic only re-checked ShouldBeHidden
-- when deciding whether to RE-SHOW an already-hidden icon, so a filtered icon
-- that was already visible (e.g. a dungeon quest) lingered on the minimap
-- while the world map correctly hid it. Hiding here keeps both maps in sync. (#11)
if self:ShouldBeHidden() then
if not self.hidden then
self:FakeHide()
end
return
end
local xd = QuestieMap.playerX - x
local yd = QuestieMap.playerY - y
local distance = math.sqrt(xd * xd + yd * yd)
@@ -827,14 +842,30 @@ function QuestieMap:DrawWorldIcon(data, areaID, x, y, showFlag)
y = self.worldY
end
if (x and y) then
-- Proactively hide any filtered minimap icon even if currently shown,
-- keeping the minimap in sync with the world-map filters. (#11)
if self:ShouldBeHidden() then
if not self.hidden then
self:FakeHide()
end
return
end
local xd = QuestieMap.playerX - x
local yd = QuestieMap.playerY - y
local distance = math.sqrt(xd * xd + yd * yd);
local minimapVisibilityCutoff = self.minimapVisibilityCutoff or profile.minimapIconRangeCutoff or 100;
-- Hard stop: keep minimap pins from remaining visible beyond
-- the configured minimap range cutoff.
if (distance > minimapVisibilityCutoff) then
-- Only clip icons OUTSIDE the minimap's visible radius, so a cutoff smaller
-- than the current view radius doesn't hide icons that are on the minimap (#17).
local minimapRadius = (HBDPins and HBDPins.GetMinimapRadius and HBDPins:GetMinimapRadius()) or 0
local effectiveCutoff = minimapVisibilityCutoff
if minimapRadius and minimapRadius > effectiveCutoff then
effectiveCutoff = minimapRadius
end
-- Hard stop: keep minimap pins from remaining visible beyond the cutoff.
if (distance > effectiveCutoff) then
self:FakeHide()
return
elseif self.hidden then