diff --git a/OpenRA.Mods.RA/GainsExperience.cs b/OpenRA.Mods.RA/GainsExperience.cs index 6636bf8948..2363782fb0 100644 --- a/OpenRA.Mods.RA/GainsExperience.cs +++ b/OpenRA.Mods.RA/GainsExperience.cs @@ -26,7 +26,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { - public class GainsExperienceInfo : ITraitInfo + public class GainsExperienceInfo : ITraitInfo, ITraitPrerequisite { //public readonly float[] CostThreshold = {2,4,8}; public readonly float[] CostThreshold = { 1, 1.5f, 2 }; @@ -39,14 +39,15 @@ namespace OpenRA.Mods.RA public class GainsExperience : IFirepowerModifier, ISpeedModifier, IDamageModifier { readonly Actor self; - readonly List Levels; + readonly int[] Levels; readonly GainsExperienceInfo Info; + public GainsExperience(Actor self, GainsExperienceInfo info) { this.self = self; this.Info = info; var cost = self.Info.Traits.Get().Cost; - Levels = Info.CostThreshold.Select(t => t * cost).ToList(); + Levels = Info.CostThreshold.Select(t => (int)(t * cost)).ToArray(); } [Sync]