Fix Sunstrider Isle arrow, Tooltip type guard, mapId 946 override
- zoneDB.lua: Add [946] = 3430 to UiMapIdOverrides so GetCurrentZoneId() returns 3430 (Sunstrider Isle areaId) even when the game returns uiMapId 946 (ghost/loading map). Previously 946 had no override, causing zone lookups to fall through and return 946 instead of the real zone, breaking arrow distance calculation and target filtering. - QuestieArrow.lua: UpdateNearestTargets uses QuestiePlayer:GetCurrentUiMapId() (backed by C_Map.GetBestMapForUnit) for player position. When that returns an invalid/ghost map (946/947/0), fall back to ZoneDB lookup via the actual zoneId. This ensures the arrow gets real world coordinates regardless of whether the world map is open or closed. Also includes per-frame debug output when debugArrow profile is enabled. - Tooltip.lua: Add type guard 'if type(objList) ~= table then break end' before iterating learnedNpc[10] and learnedObj[10] in both m_/NPC and o_/object paths. Prevents 'attempt to index field questData (a string value)' error when the questData field is unexpectedly a string instead of a table. The original loop used 'for questId, objList in next, learnedNpc[10]' which iterates key-value pairs in insertion order. The _AddToArray helper stores values as sequential array elements (tbl[key]=value via table.insert), but the iteration was treating it as a questId->objList map. Fixed to use ipairs-style iteration with a type check for robustness.
This commit is contained in:
@@ -49,6 +49,8 @@ local UiMapIdOverrides = {
|
||||
[246] = 3713,
|
||||
[1415] = 668, -- Eastern Kingdoms (matches Undercity on Ascension)
|
||||
[947] = 668, -- Azeroth (matches Undercity on Ascension)
|
||||
[1241] = 3430, -- Sunstrider Isle (uiMapId 1241 → areaId 3430)
|
||||
[946] = 3430, -- Sunstrider Isle ghost/loading map → areaId 3430
|
||||
}
|
||||
local parentZoneToSubZone = {} -- Generated
|
||||
local zoneMap = {} -- Generated
|
||||
|
||||
Reference in New Issue
Block a user