Merge pull request #8756 from atlimit8/FixUpgradableMultiplierTrait
Fix #8751 - IndexOutOfRangeException when UpgradeMultiplierTrait is pre-enabled
This commit is contained in:
@@ -45,6 +45,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
throw new Exception("No modifiers in " + modifierType + " for " + actorType);
|
throw new Exception("No modifiers in " + modifierType + " for " + actorType);
|
||||||
this.info = info;
|
this.info = info;
|
||||||
IsTraitDisabled = info.UpgradeTypes.Length > 0 && info.BaseLevel > 0;
|
IsTraitDisabled = info.UpgradeTypes.Length > 0 && info.BaseLevel > 0;
|
||||||
|
level = IsTraitDisabled ? 0 : info.BaseLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AcceptsUpgradeLevel(Actor self, string type, int level)
|
public bool AcceptsUpgradeLevel(Actor self, string type, int level)
|
||||||
|
|||||||
Reference in New Issue
Block a user