From 294240de7fae0157b4d330cbf830cc3a067240dd Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 27 May 2010 18:35:44 +1200 Subject: [PATCH] fix missing prereq on GainsExperience; List -> array; float -> int --- OpenRA.Mods.RA/GainsExperience.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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]