This commit is contained in:
FlightControl
2016-12-15 14:51:08 +01:00
parent 74cee904cd
commit d62acf421e
12 changed files with 84 additions and 59269 deletions

View File

@@ -104,13 +104,14 @@ end
-- @param #MISSION self
-- @param Wrapper.Unit#UNIT PlayerUnit The CLIENT or UNIT of the Player joining the Mission.
-- @return #boolean true if Unit is part of a Task in the Mission.
function MISSION:AddUnit( PlayerUnit )
function MISSION:JoinUnit( PlayerUnit )
self:F( { PlayerUnit = PlayerUnit } )
local PlayerUnitAdded = false
for TaskID, Task in pairs( self:GetTasks() ) do
if Task:AddUnit( PlayerUnit ) then
local Task = Task -- Tasking.Task#TASK_BASE
if Task:JoinUnit( PlayerUnit ) then
PlayerUnitAdded = true
end
end