v1.6.3-unreleased: Sunstrider zone fixes, QuestieLearner icon preservation, migration, and Busted test suite

Code changes (13 files, +916/-171):
- ZoneDB integration: GetZoneId() converts uiMapId→areaId via ZoneDB reverse lookup
- MIN_CONFIDENCE_PINS reduced to 1 for Ascension (incomplete NPC DBs)
- QuestieLearner icon preservation: objective Icon passed to RegisterObjectiveTooltip
- InjectLearnedData zone migration: converts old uiMapId spawn keys to areaId
- areaId passed through all LearnNPC call sites (OnMouseoverUnit, OnQuestDetail,
  OnQuestComplete, OnQuestAccepted, OnQuestTurnedIn, OnGossipShow)
- Compat/Compat.lua: C_Map.GetPlayerMapPosition UiMapData support
- Compat/HBD.lua: Sunstrider mapData aliases and fallback loading
- Sunstrider arrow fix (QuestieArrow.lua), resolved pin rendering (QuestieMap.lua)
- _MergeOverride helper for string/numeric key compatibility
- Northshire Valley UiMapData registration

Testing infrastructure:
- .busted config pointing to tests/ directory
- Tests/wow_api_mock.lua: WoW API mocks (ZoneDB, C_Map, QuestLogCache, etc.)
- Tests/QuestieLearner_spec.lua: 12 tests covering coordinate scaling, spell cast
  learning, zone migration (NPC/objects), icon preservation, settings defaults,
  and LearnNPC spawn zone tracking
- selene.toml + wow_classic.yml: linter configuration

Documentation:
- Makefile with test/lint/ci targets
- sunstrider-coordinate-collection.md: coordinate data reference
- sunstrider-pin-fix.md: root cause analysis and fix documentation
This commit is contained in:
Xurkon
2026-05-16 07:32:47 -05:00
parent 306fb2ac89
commit bf6ecaedbe
22 changed files with 2218 additions and 179 deletions
+9 -5
View File
@@ -50,7 +50,10 @@ ZoneDB.zoneIDs = ZoneDB.private.zoneIDs or {}
local UiMapIdOverrides = {
[246] = 3713,
[1415] = 668, -- Eastern Kingdoms (matches Undercity on Ascension)
[1241] = 3430, -- Sunstrider Isle (uiMapId 1241 → areaId 3430)
-- [1241] intentionally NOT overridden: areaId 3430 = Eversong Woods (the whole zone),
-- and should map to uiMapId 1941 (Eversong map) for proper coordinate rendering.
-- Sunstrider sub-zone pins are handled via ZONE_REDIRECT in HBD.lua (visibility)
-- and _ResolveMapUiMapId in QuestieMap.lua (coordinate conversion).
[1238] = 668, -- Northshire Valley child map (Conquest of Azeroth)
-- [946] = 668 removed: both Sunstrider Isle AND Northshire Valley use 946 as ghost/zone map,
-- so 946 cannot be overridden to a single zone. Instead, uiMapIdToAreaIdCache handles both.
@@ -64,14 +67,15 @@ ZoneDB.private.uiMapIdToAreaId[946] = 3430 -- Ghost map for Sunstrider Isle (di
-- Northshire Valley (areaId 668) uses uiMapId 1238.
ZoneDB.private.areaIdToUiMapId[668] = 1238
areaIdToUiMapId[668] = 1238
-- Sunstrider Isle (areaId 3430) uses uiMapId 1241.
ZoneDB.private.areaIdToUiMapId[3430] = 1241
areaIdToUiMapId[3430] = 1241
-- Eversong Woods (areaId 3430) maps to the Eversong Woods map (uiMapId 1941).
-- Sunstrider Isle (uiMapId 1241) is a child map that shares Eversong's coordinate space.
-- Pins for zone 3430 render on map 1941 and appear on map 1241 via ZONE_REDIRECT visibility.
ZoneDB.private.areaIdToUiMapId[3430] = 1941
areaIdToUiMapId[3430] = 1941
-- Also populate the cache so the fast path works without a lazy lookup.
if uiMapIdToAreaIdCache[1238] == nil then
uiMapIdToAreaIdCache[1238] = 668
end
-- Sunstrider Isle overrides (separate from Northshire since they're different Ascension realms)
if uiMapIdToAreaIdCache[1241] == nil then
uiMapIdToAreaIdCache[1241] = 3430
end