fix: Sunstrider pin regression, ghost pins, and learner zone normalization
- Fix: isSunstrider block in _MergeSpawnEvidence now checks IsAscensionProtected before writing learner data to npcDataOverrides. Without this guard, each Mana Wyrm kill overwrote AscensionDB's z1241=5 data with learner z3431 coords. - Fix: Clustering disabled for zone 1241 (Sunstrider Isle) in _DrawObjectiveIcons so all 5 AscensionDB spawn pins display individually instead of collapsing to 2. - Fix: Ghost pin loop in AvailableQuests.lua -- 'while frames[i]' was iterating a string-keyed table with a numeric index (never iterated). Changed to pairs(). - Fix: NormalizeSpawnZoneKey now uses ZoneDB.areaIdToUiMapId for all zones so learner evidence is stored under map IDs (e.g. 1241) not area IDs (e.g. 3431), matching AscensionDB's key space. Applied in LearnNPC and _StoreGuidSpawnEvidence. - Fix: isSunstrider detection in _MergeSpawnEvidence updated from hardcoded zoneId==3431 check to IsSunstriderNativeZone() since zone IDs are now normalized to map IDs at storage time.
This commit is contained in:
+30
-6
@@ -2182,11 +2182,35 @@ local function _Asc_LoadIfString(data, label)
|
||||
return data
|
||||
end
|
||||
|
||||
local function _Asc_MergeInto(dst, src)
|
||||
local function _Asc_ProtectField(dbType, id, key)
|
||||
QuestieDB.ascensionOverrideKeys = QuestieDB.ascensionOverrideKeys or {}
|
||||
QuestieDB.ascensionOverrideKeys[dbType] = QuestieDB.ascensionOverrideKeys[dbType] or {}
|
||||
QuestieDB.ascensionOverrideKeys[dbType][id] = QuestieDB.ascensionOverrideKeys[dbType][id] or {}
|
||||
QuestieDB.ascensionOverrideKeys[dbType][id][key] = true
|
||||
end
|
||||
|
||||
local function _Asc_MergeInto(dst, src, dbType)
|
||||
if type(dst) ~= "table" or type(src) ~= "table" then return end
|
||||
local id, entry = next(src)
|
||||
while id do
|
||||
dst[id] = entry -- overwrite = true
|
||||
local existing = dst[id]
|
||||
if type(existing) == "table" and type(entry) == "table" then
|
||||
local key, value = next(entry)
|
||||
while key do
|
||||
existing[key] = value
|
||||
_Asc_ProtectField(dbType, id, key)
|
||||
key, value = next(entry, key)
|
||||
end
|
||||
else
|
||||
dst[id] = entry
|
||||
if type(entry) == "table" then
|
||||
local key = next(entry)
|
||||
while key do
|
||||
_Asc_ProtectField(dbType, id, key)
|
||||
key = next(entry, key)
|
||||
end
|
||||
end
|
||||
end
|
||||
id, entry = next(src, id)
|
||||
end
|
||||
end
|
||||
@@ -2196,7 +2220,7 @@ function QuestieDB:LoadAscensionQuestData()
|
||||
if not A then return end
|
||||
local data = _Asc_LoadIfString(A.questData, "AscensionDB.questData")
|
||||
QuestieDB.questDataOverrides = QuestieDB.questDataOverrides or {}
|
||||
_Asc_MergeInto(QuestieDB.questDataOverrides, data)
|
||||
_Asc_MergeInto(QuestieDB.questDataOverrides, data, "QUEST")
|
||||
end
|
||||
|
||||
function QuestieDB:LoadAscensionNpcData()
|
||||
@@ -2204,7 +2228,7 @@ function QuestieDB:LoadAscensionNpcData()
|
||||
if not A then return end
|
||||
local data = _Asc_LoadIfString(A.npcData, "AscensionDB.npcData")
|
||||
QuestieDB.npcDataOverrides = QuestieDB.npcDataOverrides or {}
|
||||
_Asc_MergeInto(QuestieDB.npcDataOverrides, data)
|
||||
_Asc_MergeInto(QuestieDB.npcDataOverrides, data, "NPC")
|
||||
end
|
||||
|
||||
function QuestieDB:LoadAscensionObjectData()
|
||||
@@ -2212,7 +2236,7 @@ function QuestieDB:LoadAscensionObjectData()
|
||||
if not A then return end
|
||||
local data = _Asc_LoadIfString(A.objectData, "AscensionDB.objectData")
|
||||
QuestieDB.objectDataOverrides = QuestieDB.objectDataOverrides or {}
|
||||
_Asc_MergeInto(QuestieDB.objectDataOverrides, data)
|
||||
_Asc_MergeInto(QuestieDB.objectDataOverrides, data, "OBJECT")
|
||||
end
|
||||
|
||||
function QuestieDB:LoadAscensionItemData()
|
||||
@@ -2220,7 +2244,7 @@ function QuestieDB:LoadAscensionItemData()
|
||||
if not A then return end
|
||||
local data = _Asc_LoadIfString(A.itemData, "AscensionDB.itemData")
|
||||
QuestieDB.itemDataOverrides = QuestieDB.itemDataOverrides or {}
|
||||
_Asc_MergeInto(QuestieDB.itemDataOverrides, data)
|
||||
_Asc_MergeInto(QuestieDB.itemDataOverrides, data, "ITEM")
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -79,6 +79,8 @@ ZoneDB.private.areaIdToUiMapId[3430] = 1941
|
||||
areaIdToUiMapId[3430] = 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.
|
||||
-- Future agents: Sunstrider Isle uses areaId 3431 and uiMapId 1241; convert
|
||||
-- Eversong-derived source spawns into 1241 map space before injecting pins.
|
||||
ZoneDB.private.areaIdToUiMapId[3431] = 1241
|
||||
areaIdToUiMapId[3431] = 1241
|
||||
-- Allow drawing pins directly on Sunstrider Isle (uiMapId 1241) via areaId 1241.
|
||||
|
||||
Reference in New Issue
Block a user