little lua fix on killing in the name of creaturescripts

This commit is contained in:
ErikasKontenis 2021-04-17 13:42:59 +03:00
parent 239b13bbf1
commit 6e37e1a74b

View File

@ -115,6 +115,10 @@ function onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjus
return true
end
if mostdamagekiller == nil then
return true
end
local player = mostdamagekiller
if not mostdamagekiller:isPlayer() then
local master = mostdamagekiller:getMaster()