Merge pull request #8756 from atlimit8/FixUpgradableMultiplierTrait

Fix #8751 - IndexOutOfRangeException when UpgradeMultiplierTrait is pre-enabled
This commit is contained in:
abcdefg30
2015-07-20 13:23:48 +02:00

View File

@@ -45,6 +45,7 @@ namespace OpenRA.Mods.Common.Traits
throw new Exception("No modifiers in " + modifierType + " for " + actorType);
this.info = info;
IsTraitDisabled = info.UpgradeTypes.Length > 0 && info.BaseLevel > 0;
level = IsTraitDisabled ? 0 : info.BaseLevel;
}
public bool AcceptsUpgradeLevel(Actor self, string type, int level)