Remove bogus 'OrDefault' from UpgradeOnDamage
UpgradeManager is required anyway, so this was redundant.
This commit is contained in:
@@ -44,14 +44,11 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public UpgradeOnDamage(Actor self, UpgradeOnDamageInfo info)
|
public UpgradeOnDamage(Actor self, UpgradeOnDamageInfo info)
|
||||||
{
|
{
|
||||||
this.info = info;
|
this.info = info;
|
||||||
um = self.TraitOrDefault<UpgradeManager>();
|
um = self.Trait<UpgradeManager>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void INotifyDamageStateChanged.DamageStateChanged(Actor self, AttackInfo e)
|
void INotifyDamageStateChanged.DamageStateChanged(Actor self, AttackInfo e)
|
||||||
{
|
{
|
||||||
if (um == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (granted && info.GrantPermanently)
|
if (granted && info.GrantPermanently)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user