Real bug fixes (no behavior additions that risk regressions):
- LearnNPC: require both spawnX/spawnY AND x/y before accepting a spawn
entry. Previously quest-giver/finisher dialog polluted spawn lists
with the player's current position.
- _MergeSpawnEvidence: respect IsAscensionProtected ownership gate
unconditionally. The 'test mode' comment-out is removed; AscensionDB
curated spawn data is now protected from learner overwrite (fixes
the Sunstrider Mana Wyrm pin regression).
- _PruneSpawnOutliers and PruneLearnedSpawnOutliers: fix broken
next() iteration. The old code used 'coord = next(spawnTable); while
coord do ... coord = next(spawnTable, coord)' which treated the
KEY as the value. For numeric spawn arrays this returned indices
(1, 2, ...) but the code did coord[1] and coord[2] on those indices,
which are nil. The outlier pruning was effectively dead code. Now
iterates with 'coordKey, coord = next(spawnTable)' correctly, sorts
toRemove keys descending for safe table.remove, and compacts numeric
arrays.
- InjectLearnedData: early-exit when learner disabled, strip [7] on
initial npcDataOverrides creation (only _MergeSpawnEvidence should
populate spawns), versioned cleanup that retroactively clears
singleton-position spawn entries (≤1 unique position) from pollution
caused by the prior LearnNPC bug.
Supporting utilities added: CopyWithoutField, CountUniqueSpawnPositions,
NormalizeCoordPair reuse (replaces inline floor(x*100+0.5)/100).
- 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.
QuestieDB:GetNPC and GetObject cache results in _QuestieDB.npcCache /
_QuestieDB.objectCache. When LearnNPC / LearnObject injects new spawn
coordinates into npcDataOverrides / objectDataOverrides, the cached
objects still hold stale (empty) spawn data. PopulateObjective rebuilds
spawnList by calling GetNPC/GetObject, but gets the cached empty data.
Fix: clear the relevant cache entry immediately after live injection so
the next GetNPC/GetObject call rebuilds with fresh override data.
This is the root cause of 'pins not showing on kill' — the spawnList
was rebuilt, but from a stale cache that didn't include the new learned
coordinates.