fix: prefer loot source for item drops

This commit is contained in:
Xurkon
2026-06-06 09:44:51 -05:00
parent 36668338f5
commit b0f2088ab7
3 changed files with 32 additions and 14 deletions
+3 -1
View File
@@ -3438,7 +3438,9 @@ function QuestieLearner:OnLootOpened()
TraceLearnerEntity("loot_source", sourceGuid, nil, sourceQty, lootName)
if type(sourceGuid) == "string" then
local sourceId, sourceType = GetIdAndTypeFromGUID(sourceGuid)
if sourceType == "GameObject" and sourceId and sourceId > 0 then
if (sourceType == "Creature" or sourceType == "Vehicle") and sourceId and sourceId > 0 then
npcId = sourceId
elseif sourceType == "GameObject" and sourceId and sourceId > 0 then
self:LearnObject(sourceId, nil)
end
end