internal int GetTrainingTime(CharacterData Character) { List <Building> Barracks = (Character.UnitOfType == 1 ? this.Level.ComponentManager.Barracks : this.Level.ComponentManager.DarkBarracks) .FindAll(Barrack => Barrack.GetUpgradeLevel() >= Character.BarrackLevel - 1); if (Barracks.Count != 0) { return(Character.TrainingTime / Barracks.Count); } return(Character.TrainingTime); }