fix(Sunstrider): correct map pins, override check, nil guards
- zoneDB: remap areaId 3431 → uiMapId 1241 (Sunstrider Isle) so quest 8335 pins render on correct map instead of Eversong Woods (1941) - compat/HBD: remove 1241→1941 redirect (Sunstrider pins now handled by zoneDB) - compiler: QuerySingle override check skips empty tables (next() guard) so spawn data overrides don't fall through to nil base DB values - MapIconTooltip: nil guards for minLevel/maxLevel to prevent crashes - Map/QuestieMap: remove stale 1241→1941 redirect comment
This commit is contained in:
@@ -52,8 +52,7 @@ local UiMapIdOverrides = {
|
||||
[1415] = 668, -- Eastern Kingdoms (matches Undercity on Ascension)
|
||||
-- [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).
|
||||
-- Zone 1241 pins render on map 1241 only (separate coordinate space from Eversong).
|
||||
[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.
|
||||
@@ -78,8 +77,10 @@ areaIdToUiMapId[668] = 1238
|
||||
-- Pins for zone 1241 render on map 1241 (Sunstrider) using Ascension-calibrated bounds.
|
||||
ZoneDB.private.areaIdToUiMapId[3430] = 1941
|
||||
areaIdToUiMapId[3430] = 1941
|
||||
ZoneDB.private.areaIdToUiMapId[3431] = 1941
|
||||
areaIdToUiMapId[3431] = 1941
|
||||
-- Sunstrider Isle (3431) uses its own map (1241) with calibrated bounds.
|
||||
-- Pins for Sunstrider NPCs (zone 1241 coords) must appear on map 1241, not 1941.
|
||||
ZoneDB.private.areaIdToUiMapId[3431] = 1241
|
||||
areaIdToUiMapId[3431] = 1241
|
||||
-- Allow drawing pins directly on Sunstrider Isle (uiMapId 1241) via areaId 1241.
|
||||
ZoneDB.private.areaIdToUiMapId[1241] = 1241
|
||||
areaIdToUiMapId[1241] = 1241
|
||||
|
||||
@@ -1439,10 +1439,16 @@ function QuestieDBCompiler:GetDBHandle(data, pointers, skipMap, keyToRootIndex,
|
||||
---@param key string
|
||||
---@return any
|
||||
handle.QuerySingle = function(id, key)
|
||||
local override = overrides[id]
|
||||
if override then
|
||||
-- Check override first for custom server data
|
||||
if overrides and overrides[id] then
|
||||
local kti = keyToRootIndex[key]
|
||||
if kti and override[kti] ~= nil then return override[kti] end
|
||||
if kti then
|
||||
local overrideVal = overrides[id][kti]
|
||||
-- Only use override if it has actual data (not nil, not empty table)
|
||||
if overrideVal ~= nil and not (type(overrideVal) == "table" and next(overrideVal) == nil) then
|
||||
return overrideVal
|
||||
end
|
||||
end
|
||||
end
|
||||
local ptr = pointers[id]
|
||||
if not ptr then
|
||||
|
||||
Reference in New Issue
Block a user