Fix Sunstrider Isle areaId override for GetAreaIdByUiMapId
When UpdateNearestTargets uses ZoneDB:GetAreaIdByUiMapId(946) to verify player zone, it returns 668 (Northshire) instead of 3430 (Sunstrider). UiMapIdOverrides[946] was set to 668 for Northshire, so 946 always resolves to Northshire's areaId even on Sunstrider Isle. Added direct cache entries for both 1241→3430 and 946→3430 in the uiMapIdToAreaIdCache (the fast-path lookup table) so GetAreaIdByUiMapId returns the correct Sunstrider Isle areaId regardless of which map ID the game returns.
This commit is contained in:
@@ -54,6 +54,11 @@ local UiMapIdOverrides = {
|
||||
[1238] = 668, -- Northshire Valley child map (Conquest of Azeroth)
|
||||
[946] = 668, -- Northshire Valley zone map (Conquest of Azeroth) - GetCurrentUiMapID() returns 946, not 1238
|
||||
}
|
||||
|
||||
-- Sunstrider Isle overrides (separate from Northshire since they're different Ascension realms)
|
||||
ZoneDB.private.uiMapIdToAreaId = ZoneDB.private.uiMapIdToAreaId or {}
|
||||
ZoneDB.private.uiMapIdToAreaId[1241] = 3430
|
||||
ZoneDB.private.uiMapIdToAreaId[946] = 3430 -- Ghost map for Sunstrider Isle (different zone than Northshire's 946)
|
||||
-- Reverse mapping: areaId → uiMapId for GetUiMapIdByAreaId lookups.
|
||||
-- Northshire Valley (areaId 668) uses uiMapId 1238.
|
||||
ZoneDB.private.areaIdToUiMapId[668] = 1238
|
||||
@@ -62,6 +67,13 @@ areaIdToUiMapId[668] = 1238
|
||||
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
|
||||
if uiMapIdToAreaIdCache[946] == nil then
|
||||
uiMapIdToAreaIdCache[946] = 3430 -- Ghost map for Sunstrider Isle (different zone than Northshire's 946)
|
||||
end
|
||||
local parentZoneToSubZone = {} -- Generated
|
||||
local zoneMap = {} -- Generated
|
||||
|
||||
|
||||
Reference in New Issue
Block a user