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:
Xurkon
2026-05-25 19:02:56 -05:00
parent 7a7b1eb727
commit 164584ca87
16 changed files with 880 additions and 221 deletions
+30 -1
View File
@@ -160,7 +160,36 @@ monster = function(npcId, objective)
if learnedNpc then
local learnedSpawns = learnedNpc[7]
local threshold = ld.settings.minConfidencePins or 1
if learnedSpawns and next(learnedSpawns) and learnedNpc.mc and learnedNpc.mc >= threshold then
-- Do not override Ascension-curated spawn data with raw learner data.
-- AscensionDB hand-curates positions for Ascension-specific zones (e.g. Sunstrider)
-- which the learner can never improve upon, and the learner coords may be in the
-- wrong coordinate space due to Sunstrider/Eversong map-zone mismatch.
local ascProtected = QuestieDB.ascensionOverrideKeys
and QuestieDB.ascensionOverrideKeys["NPC"]
and QuestieDB.ascensionOverrideKeys["NPC"][npcId]
and QuestieDB.ascensionOverrideKeys["NPC"][npcId][7]
if npcId == 15274 then
-- Count spawn entries per zone key
local spawnZones = ""
if type(spawns) == "table" then
for zk, coords in pairs(spawns) do
spawnZones = spawnZones .. "z" .. tostring(zk) .. "=" .. tostring(type(coords) == "table" and #coords or "?") .. " "
end
end
local learnedZones = ""
if type(learnedSpawns) == "table" then
for zk, coords in pairs(learnedSpawns) do
learnedZones = learnedZones .. "z" .. tostring(zk) .. "=" .. tostring(type(coords) == "table" and #coords or "?") .. " "
end
end
print(string.format("[QD] NPC 15274: dbSpawns={%s} learnedSpawns={%s} mc=%s threshold=%s ascProtected=%s -> uselearner=%s",
spawnZones, learnedZones,
tostring(learnedNpc.mc), tostring(threshold),
tostring(ascProtected),
tostring(learnedSpawns and next(learnedSpawns) and learnedNpc.mc and learnedNpc.mc >= threshold and not ascProtected)))
end
if learnedSpawns and next(learnedSpawns) and learnedNpc.mc and learnedNpc.mc >= threshold
and not ascProtected then
Questie:Debug(Questie.DEBUG_DEVELOP, "[monster] Preferring learned spawns for NPC:", npcId, "(mc=" .. tostring(learnedNpc.mc) .. ")")
spawns = learnedSpawns
isLearned = true