Make all warheads use WarheadArgs
Instead of passing damageModifiers directly.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
@@ -17,10 +18,10 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
{
|
||||
public class HealthPercentageDamageWarhead : TargetDamageWarhead
|
||||
{
|
||||
protected override void InflictDamage(Actor victim, Actor firedBy, HitShapeInfo hitshapeInfo, IEnumerable<int> damageModifiers)
|
||||
protected override void InflictDamage(Actor victim, Actor firedBy, HitShape shape, WarheadArgs args)
|
||||
{
|
||||
var healthInfo = victim.Info.TraitInfo<HealthInfo>();
|
||||
var damage = Util.ApplyPercentageModifiers(healthInfo.HP, damageModifiers.Append(Damage, DamageVersus(victim, hitshapeInfo)));
|
||||
var damage = Util.ApplyPercentageModifiers(healthInfo.HP, args.DamageModifiers.Append(Damage, DamageVersus(victim, shape, args)));
|
||||
victim.InflictDamage(firedBy, new Damage(damage, DamageTypes));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user