Added Reset of event subscriptions after GROUP:Respawn()

This commit is contained in:
FlightControl
2017-04-11 08:20:54 +02:00
parent 51c1da3557
commit 12948f583d
2 changed files with 5 additions and 2 deletions

View File

@@ -834,6 +834,9 @@ function GROUP:Respawn( Template )
self:Destroy() self:Destroy()
_DATABASE:Spawn( Template ) _DATABASE:Spawn( Template )
self:ResetEvents()
end end
--- Returns the group template from the @{DATABASE} (_DATABASE object). --- Returns the group template from the @{DATABASE} (_DATABASE object).
@@ -1085,7 +1088,7 @@ do -- Event Handling
--- Reset the subscriptions. --- Reset the subscriptions.
-- @param #GROUP self -- @param #GROUP self
-- @return #GROUP -- @return #GROUP
function GROUP:ResetEvents( Event ) function GROUP:ResetEvents()
self:EventDispatcher():Reset( self ) self:EventDispatcher():Reset( self )

View File

@@ -994,7 +994,7 @@ do -- Event Handling
--- Reset the subscriptions. --- Reset the subscriptions.
-- @param #UNIT self -- @param #UNIT self
-- @return #UNIT -- @return #UNIT
function UNIT:ResetEvents( Event ) function UNIT:ResetEvents()
self:EventDispatcher():Reset( self ) self:EventDispatcher():Reset( self )