From f0f664e7038e1391e6f5f6c80372337f8753923b Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Fri, 2 Aug 2024 13:29:56 -0300 Subject: [PATCH] check if the actor created by the pvp parser is valid and tag the actor as made by pvp parser --- core/parser.lua | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index d1a175a1..72bfb145 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -6584,12 +6584,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 end actor = _current_damage_container:GetOrCreateActor (guid, name, flag, true) - actor.total = Details:GetOrderNumber() - actor.classe = classToken or "UNKNOW" - - if (flag == 0x548) then - --oponent - actor.enemy = true + if (actor) then + actor.total = Details:GetOrderNumber() + actor.classe = classToken or "UNKNOW" + if (flag == 0x548) then + --oponent + actor.enemy = true + end + actor.made_by_pvpparser = true end end end @@ -6614,12 +6616,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 end actor = _current_heal_container:GetOrCreateActor (guid, name, flag, true) - actor.total = Details:GetOrderNumber() - actor.classe = classToken or "UNKNOW" - - if (flag == 0x548) then - --oponent - actor.enemy = true + if (actor) then + actor.total = Details:GetOrderNumber() + actor.classe = classToken or "UNKNOW" + if (flag == 0x548) then + --oponent + actor.enemy = true + end + actor.made_by_pvpparser = true end end end