Fixing TASK_DISPATCHER and optimizing reports

This commit is contained in:
FlightControl
2016-12-18 06:09:27 +01:00
parent 59640e8df4
commit ce0be4dcf7
67 changed files with 226 additions and 430 deletions

View File

@@ -865,4 +865,22 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
return nil
end
--- Calculate the maxium A2G threat level of the Group.
-- @param #GROUP self
function GROUP:CalculateThreatLevelA2G()
local MaxThreatLevelA2G = 0
for UnitName, UnitData in pairs( self:GetUnits() ) do
local ThreatUnit = UnitData -- Wrapper.Unit#UNIT
local ThreatLevelA2G = ThreatUnit:GetThreatLevel()
if ThreatLevelA2G > MaxThreatLevelA2G then
MaxThreatLevelA2G = ThreatLevelA2G
end
end
self:T3( MaxThreatLevelA2G )
return MaxThreatLevelA2G
end