Make all warheads use WarheadArgs
Instead of passing damageModifiers directly.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
@@ -22,7 +23,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
[Desc("Damage will be applied to actors in this area. A value of zero means only targeted actor will be damaged.")]
|
||||
public readonly WDist Spread = WDist.Zero;
|
||||
|
||||
public override void DoImpact(WPos pos, Actor firedBy, IEnumerable<int> damageModifiers)
|
||||
public override void DoImpact(WPos pos, Actor firedBy, WarheadArgs args)
|
||||
{
|
||||
if (Spread == WDist.Zero)
|
||||
return;
|
||||
@@ -45,7 +46,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
if (closestActiveShape.First == null || closestActiveShape.Second > Spread)
|
||||
continue;
|
||||
|
||||
InflictDamage(victim, firedBy, closestActiveShape.First.Info, damageModifiers);
|
||||
InflictDamage(victim, firedBy, closestActiveShape.First, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user