From 1629352eb697457080ff5fd0373765e452014e98 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Mon, 8 Jun 2026 21:51:40 -0500 Subject: [PATCH] fix(learner): don't record other players' kill positions On PARTY_KILL and unengaged kills, the learner was recording the local player's position (GetCurrentPlayerPosition) as the spawn location. This polluted the learner's spawn map with the wrong coords. Now only records position for credited kills (your own kills or mobs you damaged within the last 60 seconds). --- Modules/QuestieLearner.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Modules/QuestieLearner.lua b/Modules/QuestieLearner.lua index ccd7e9b..d36c9ed 100644 --- a/Modules/QuestieLearner.lua +++ b/Modules/QuestieLearner.lua @@ -4149,10 +4149,17 @@ function QuestieLearner:OnCombatLogEvent(timestamp, eventType, srcGUID, srcName, if not npcId or npcId <= 0 then return end - local _mapId, px, py = QuestieCompat.GetCurrentPlayerPosition() - if px and py and px > 0 and py > 0 then - px = floor(px * 10000) / 100 - py = floor(py * 10000) / 100 + -- Only record YOUR position for the spawn. GetCurrentPlayerPosition() + -- returns the local player's coords, not the killer's — so for + -- party/raid kills where someone else landed the killing blow we + -- must not pollute the learner's spawn map with our own location. + local _mapId, px, py = nil, nil, nil + if credited then + _mapId, px, py = QuestieCompat.GetCurrentPlayerPosition() + if px and py and px > 0 and py > 0 then + px = floor(px * 10000) / 100 + py = floor(py * 10000) / 100 + end end local zoneId = GetZoneId() local zoneText = GetRealZoneText and GetRealZoneText() or ""