From ea25cda43dab841e422e9bb39dd9ebac8e1b0456 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Sun, 8 May 2022 11:10:26 -0300 Subject: [PATCH] Making sure we have a unitId before query UnitHealth on death log --- core/parser.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/parser.lua b/core/parser.lua index b2323593..f7b1781a 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -2241,7 +2241,11 @@ if (not unitId) then unitId = Details:GuessArenaEnemyUnitId(alvo_name) end - this_event [5] = _UnitHealth(unitId) + if (unitId) then + this_event [5] = _UnitHealth(unitId) + else + this_event [5] = 0 + end else this_event [5] = _UnitHealth(alvo_name) end