fix(learner): capture spawn coords via HBD so learner pins persist

GetPlayerCoords used raw GetPlayerMapPosition('player'), which returns
0,0 when the world map isn't on the player's zone (the usual case) and
mis-reports on Ascension subzones like Sunstrider. Learn events captured
no position, so NPCs were saved spawnSource='fallback' with no [7]
spawns and their learner-only pins never persisted -- showing briefly
after a live kill then vanishing. Read from HBD:GetPlayerZonePosition()
(robust SetMapToCurrentZone/Sunstrider-corrected, cached), falling back
to the old API only if HBD is unavailable.
This commit is contained in:
Xurkon
2026-06-10 21:04:01 -05:00
parent 49bc586c15
commit 0ebfb51ded
2 changed files with 19 additions and 0 deletions
+1
View File
@@ -40,6 +40,7 @@
### Bug Fixes
- **[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.
- **[Tooltip - ElvUI Style No Longer On By Default]** (#16) The "ElvUI tooltip style" option shipped enabled by default, so Questie restyled every default WoW tooltip — stripping the border — for users who never asked for it and don't run ElvUI. It is now opt-in (default off), and a one-time migration resets it off for existing installs so their default tooltips return. Users who want the flat style can re-enable it in the General tab.
+18
View File
@@ -13,6 +13,8 @@ local QuestLogCache = QuestieLoader:ImportModule("QuestLogCache")
local l10n = QuestieLoader:ImportModule("l10n")
---@type ZoneDB
local ZoneDB = QuestieLoader:ImportModule("ZoneDB")
---@type HBD
local HBD = (QuestieCompat and QuestieCompat.HBD) or (LibStub and LibStub("HereBeDragonsQuestie-2.0", true))
local _Learner = QuestieLearner.private or {}
@@ -287,6 +289,22 @@ local function GetZoneId()
end
local function GetPlayerCoords()
-- Prefer HBD's cached zone position. The raw GetPlayerMapPosition("player") returns 0,0
-- whenever the world map isn't set to the player's current zone (the common case — the map
-- is usually closed or showing another zone), and it also mis-reports on Ascension subzones
-- like Sunstrider Isle. That made kill/learn events fall back with NO coordinates, so learned
-- NPCs were saved as spawnSource="fallback" with no [7] spawns and their pins never persisted.
-- HBD:GetPlayerZonePosition() goes through QuestieCompat.GetCurrentPlayerPosition(), which
-- runs SetMapToCurrentZone() and corrects the Sunstrider parent/child coordinate-space
-- mismatch, and it caches the result so it is cheap to call on every kill.
if HBD and HBD.GetPlayerZonePosition then
local zx, zy = HBD:GetPlayerZonePosition()
if zx and zy and zx > 0 and zy > 0 then
-- HBD returns 01; store in 0100 scale, 2-decimal precision.
return floor(zx * 10000) / 100, floor(zy * 10000) / 100
end
end
local x, y = GetPlayerMapPosition("player")
if x and y and x > 0 and y > 0 then
-- Store in 0100 scale, 2-decimal precision