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:
@@ -304,6 +304,33 @@ end
|
||||
|
||||
QuestieCompat.C_Map = {
|
||||
GetPlayerMapPosition = function(uiMapID, unitToken)
|
||||
unitToken = unitToken or "player"
|
||||
|
||||
if uiMapID and QuestieCompat.UiMapData and QuestieCompat.UiMapData[uiMapID] then
|
||||
local originalMapAreaID = GetCurrentMapAreaID()
|
||||
local originalDungeonLevel = GetCurrentMapDungeonLevel and GetCurrentMapDungeonLevel() or 0
|
||||
local mapID = QuestieCompat.UiMapData[uiMapID].mapID
|
||||
local dungeonLevel = QuestieCompat.Round(math.mod(mapID, 1) * 10)
|
||||
|
||||
SetMapByID(math.floor(mapID) - 1)
|
||||
if dungeonLevel > 0 and SetDungeonMapLevel then
|
||||
SetDungeonMapLevel(dungeonLevel)
|
||||
end
|
||||
|
||||
local x, y = GetPlayerMapPosition(unitToken)
|
||||
|
||||
if originalMapAreaID and originalMapAreaID > 0 then
|
||||
SetMapByID(originalMapAreaID - 1)
|
||||
if originalDungeonLevel and originalDungeonLevel > 0 and SetDungeonMapLevel then
|
||||
SetDungeonMapLevel(originalDungeonLevel)
|
||||
end
|
||||
else
|
||||
SetMapToCurrentZone()
|
||||
end
|
||||
|
||||
return { uiMapID = uiMapID, x = x, y = y }, uiMapID
|
||||
end
|
||||
|
||||
return QuestieCompat.GetPlayerMapPosition()
|
||||
end,
|
||||
-- Returns map information.
|
||||
|
||||
Reference in New Issue
Block a user