mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-24 12:05:27 +00:00
Progress version 2 -- better version ...
This commit is contained in:
@@ -457,8 +457,7 @@ function EVENT:RemoveForUnit( EventClass, EventID )
|
|||||||
|
|
||||||
local EventClass = EventClass
|
local EventClass = EventClass
|
||||||
local EventPriority = EventClass:GetEventPriority()
|
local EventPriority = EventClass:GetEventPriority()
|
||||||
local Event = self.Events[EventID][EventPriority][EventClass]
|
self.Events[EventID][EventPriority][EventClass] = nil
|
||||||
Event.EventUnit = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Removes an Events entry for a GROUP.
|
--- Removes an Events entry for a GROUP.
|
||||||
@@ -471,8 +470,7 @@ function EVENT:RemoveForGroup( EventClass, EventID )
|
|||||||
|
|
||||||
local EventClass = EventClass
|
local EventClass = EventClass
|
||||||
local EventPriority = EventClass:GetEventPriority()
|
local EventPriority = EventClass:GetEventPriority()
|
||||||
local Event = self.Events[EventID][EventPriority][EventClass]
|
self.Events[EventID][EventPriority][EventClass] = nil
|
||||||
Event.EventGroup = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Clears all event subscriptions for a @{Base#BASE} derived object.
|
--- Clears all event subscriptions for a @{Base#BASE} derived object.
|
||||||
@@ -850,8 +848,8 @@ function EVENT:onEvent( Event )
|
|||||||
if ( Event.IniDCSUnitName and Event.IniDCSGroupName and Event.IniGroupName and EventData.EventGroup ) or
|
if ( Event.IniDCSUnitName and Event.IniDCSGroupName and Event.IniGroupName and EventData.EventGroup ) or
|
||||||
( Event.TgtDCSUnitName and Event.TgtDCSGroupName and Event.TgtGroupName and EventData.EventGroup ) then
|
( Event.TgtDCSUnitName and Event.TgtDCSGroupName and Event.TgtGroupName and EventData.EventGroup ) then
|
||||||
|
|
||||||
local GroupName = EventClass:GetName()
|
if EventClass:IsAlive() then
|
||||||
if GroupName then
|
local GroupName = EventClass:GetName()
|
||||||
if GroupName == Event.IniDCSGroupName or GroupName == Event.TgtDCSGroupName then
|
if GroupName == Event.IniDCSGroupName or GroupName == Event.TgtDCSGroupName then
|
||||||
-- First test if a EventFunction is Set, otherwise search for the default function
|
-- First test if a EventFunction is Set, otherwise search for the default function
|
||||||
if EventData.EventFunction then
|
if EventData.EventFunction then
|
||||||
|
|||||||
Reference in New Issue
Block a user