Refactored Health usage to IHealth.

This commit is contained in:
Andre Mohren
2018-09-27 02:02:08 +02:00
committed by reaperrr
parent 83cd7cf485
commit 640078a2b1
30 changed files with 68 additions and 61 deletions

View File

@@ -188,10 +188,10 @@ namespace OpenRA.Mods.Common.AI
var sumOfHp = 0;
foreach (var a in actors)
{
if (a.Info.HasTraitInfo<HealthInfo>())
if (a.Info.HasTraitInfo<IHealthInfo>())
{
sumOfMaxHp += a.Trait<Health>().MaxHP;
sumOfHp += a.Trait<Health>().HP;
sumOfMaxHp += a.Trait<IHealth>().MaxHP;
sumOfHp += a.Trait<IHealth>().HP;
}
}