When S_EVENT_PLAYER_ENTER_UNIT is called, then the unit is not alive yet.

This commit is contained in:
FlightControl_Master 2017-12-15 13:33:24 +01:00
parent abbb59efb9
commit b8c1135b3b

View File

@ -744,7 +744,7 @@ function EVENT:onEvent( Event )
local EventMeta = _EVENTMETA[Event.id]
--self:E( { EventMeta.Text, Event } ) -- Activate the see all incoming events ...
self:E( { EventMeta.Text, Event } ) -- Activate the see all incoming events ...
if self and
self.Events and
@ -886,6 +886,7 @@ function EVENT:onEvent( Event )
-- So now the EventClass must be a UNIT class!!! We check if it is still "Alive".
if EventClass:IsAlive() or
Event.id == EVENTS.PlayerEnterUnit or
Event.id == EVENTS.Crash or
Event.id == EVENTS.Dead then
@ -935,6 +936,7 @@ function EVENT:onEvent( Event )
-- So now the EventClass must be a GROUP class!!! We check if it is still "Alive".
if EventClass:IsAlive() or
Event.id == EVENTS.PlayerEnterUnit or
Event.id == EVENTS.Crash or
Event.id == EVENTS.Dead then