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
+38
View File
@@ -134,6 +134,44 @@ describe("QuestieLearner", function()
assert.is_true(entry2.ts >= ts1) -- timestamp refreshed
end)
it("should not double-scale already normalized GUID spawn coordinates", function()
local npcId = 15274
local unitGUID = "Creature-0-1234-567-89-15274-41298"
Questie.dbLearner.global.npcs = {
[npcId] = {
[1] = "Mana Wyrm",
},
}
Questie.dbLearner.global.settings.learnNpcs = true
QuestieLearner:_StoreGuidSpawnEvidence(npcId, unitGUID, 3431, 58.68, 43.19)
local entry = Questie.dbLearner.global.npcs[npcId][8][41298]
assert.is_not_nil(entry)
assert.are.equal(58.68, entry.x)
assert.are.equal(43.19, entry.y)
end)
it("should repair legacy 0-10000 GUID spawn coordinates before merging", function()
local npcId = 15274
local unitGUID = "Creature-0-1234-567-89-15274-41298"
Questie.dbLearner.global.npcs = {
[npcId] = {
[1] = "Mana Wyrm",
},
}
Questie.dbLearner.global.settings.learnNpcs = true
QuestieLearner:_StoreGuidSpawnEvidence(npcId, unitGUID, 3431, 5868, 4319)
local entry = Questie.dbLearner.global.npcs[npcId][8][41298]
assert.is_not_nil(entry)
assert.are.equal(58.68, entry.x)
assert.are.equal(43.19, entry.y)
end)
--==========================================================================
-- Existing test: spell cast learning
--==========================================================================