From 3aec9e9238978ac15ffa782a459a1159305d5792 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 f357fa650..42c912bc7 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -7240,12 +7240,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 @@ -7270,12 +7272,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