Core: Added the attacker to IDamageModifier' GetDamageModifier
This commit is contained in:
@@ -82,7 +82,7 @@ namespace OpenRA.Traits
|
||||
|
||||
/* apply the damage modifiers, if we have any. */
|
||||
var modifier = (float)self.TraitsImplementing<IDamageModifier>().Concat(self.Owner.PlayerActor.TraitsImplementing<IDamageModifier>())
|
||||
.Select(t => t.GetDamageModifier(warhead)).Product();
|
||||
.Select(t => t.GetDamageModifier(attacker, warhead)).Product();
|
||||
|
||||
damage = (int)(damage * modifier);
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public interface INotifyAttack { void Attacking(Actor self); }
|
||||
public interface IRenderModifier { IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r); }
|
||||
public interface IDamageModifier { float GetDamageModifier( WarheadInfo warhead ); }
|
||||
public interface IDamageModifier { float GetDamageModifier(Actor attacker, WarheadInfo warhead); }
|
||||
public interface ISpeedModifier { float GetSpeedModifier(); }
|
||||
public interface IFirepowerModifier { float GetFirepowerModifier(); }
|
||||
public interface IPalette { void InitPalette( WorldRenderer wr ); }
|
||||
|
||||
Reference in New Issue
Block a user