From 96de81fef361015a233d808819b09f24459e8a3b Mon Sep 17 00:00:00 2001 From: FlightControl Date: Tue, 11 Apr 2017 08:43:03 +0200 Subject: [PATCH] Fixed Dead event and Crash event glitch When a Dead or Crash event happens on UNIT or GROUP level, the OnEventFunction is also called now!!! --- Moose Development/Moose/Core/Event.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index e4658dc0f..ff0200d06 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -830,7 +830,9 @@ function EVENT:onEvent( Event ) if EventData.EventUnit then -- So now the EventClass must be a UNIT class!!! We check if it is still "Alive". - if EventClass:IsAlive() then + if EventClass:IsAlive() or + Event.id == EVENTS.Crash or + Event.id == EVENTS.Dead then local UnitName = EventClass:GetName() @@ -877,7 +879,9 @@ function EVENT:onEvent( Event ) if EventData.EventGroup then -- So now the EventClass must be a GROUP class!!! We check if it is still "Alive". - if EventClass:IsAlive() then + if EventClass:IsAlive() or + Event.id == EVENTS.Crash or + Event.id == EVENTS.Dead then -- We can get the name of the EventClass, which is now always a GROUP object. local GroupName = EventClass:GetName()