fix: draw pins from immediate learner kill evidence

This commit is contained in:
Xurkon
2026-06-05 22:27:27 -05:00
parent c6e118165f
commit 6f4bd69d00
3 changed files with 69 additions and 3 deletions
+22 -1
View File
@@ -36,7 +36,7 @@ describe("QuestieLearner data source mode", function()
local priv = read("Modules/Quest/QuestieQuestPrivates.lua")
local tip = read("Modules/Tooltips/Tooltip.lua")
assert.is_true(has(quest, "dataSourceMode == \"auto\" or dataSourceMode == \"learner\""))
assert.is_true(has(priv, "dataSourceMode == \"none\" or dataSourceMode == \"learner\""))
assert.is_true(has(priv, "dataSourceMode == \"none\""))
assert.is_true(has(tip, "mode ~= \"static\" and mode ~= \"none\""))
end)
@@ -167,6 +167,27 @@ describe("QuestieDB learner source fallback", function()
assert.equals(44, npc.zoneID)
end)
it("turns learner kill evidence into NPC spawn coordinates immediately in learner mode", function()
Questie.dbLearner.global.npcs[9003] = {
[1] = "Learner Kill",
[8] = {
[101] = {
zoneId = 44,
x = 18.5,
y = 27.25,
},
},
}
local npc = QuestieDB:GetNPC(9003)
assert.is_table(npc)
assert.is_table(npc.spawns)
assert.is_table(npc.spawns[44])
assert.equals(1, #npc.spawns[44])
assert.equals(18.5, npc.spawns[44][1][1])
assert.equals(27.25, npc.spawns[44][1][2])
end)
it("returns learner object data when static queries are unavailable", function()
local obj = QuestieDB:GetObject(9002)
assert.is_table(obj)