public override ErrorList Validate() { var result = new ErrorList(); result.AddRange(base.Validate()); if (Language != null) { result.AddRange(Language.Validate()); } if (Mode != null) { Mode.ForEach(elem => result.AddRange(elem.Validate())); } if (ProficiencyLevel != null) { result.AddRange(ProficiencyLevel.Validate()); } if (Preference != null) { result.AddRange(Preference.Validate()); } return(result); }
public static string ToProficiencyString( ProficiencyLevel p ) { if ( (Int32)p >= ProficiencyNames.Count<string>() ) return "Unknown"; return ProficiencyNames[Convert.ToInt32(p)]; }
public static string ToProficiencyString(ProficiencyLevel p) { if ((Int32)p >= ProficiencyNames.Count <string>()) { return("Unknown"); } return(ProficiencyNames[Convert.ToInt32(p)]); }
/// <summary> /// Loads all proficiency levels ordered by level. /// </summary> /// <returns>All proficiency levels.</returns> public async Task <IEnumerable <ProficiencyLevel> > LoadProficiencyLevelsAsync() { var command = new SqlCommand("ProficiencyLevels_SelectAll", await GetOpenConnectionAsync()); command.CommandType = System.Data.CommandType.StoredProcedure; List <ProficiencyLevel> proficiencyLevels = new List <ProficiencyLevel>(); using (SqlDataReader reader = await command.ExecuteReaderAsync()) { while (await reader.ReadAsync()) { var proficiencyLevel = new ProficiencyLevel(); proficiencyLevel.Level = reader.Field <int>("Level"); proficiencyLevel.Name = reader.Field <string>("Name"); proficiencyLevel.SecondPersonDescription = reader.Field <string>("SecondPersonDescription"); proficiencyLevel.ThirdPersonDescription = reader.Field <string>("ThirdPersonDescription"); proficiencyLevels.Add(proficiencyLevel); } } return(proficiencyLevels); }
public static float GetRatio(ProficiencyLevel lvl) { switch (lvl) { case ProficiencyLevel.HALF: return(0.5f); break; case ProficiencyLevel.FULL: return(1f); break; case ProficiencyLevel.DOUBLE: return(2f); break; default: return(0f); } }
public WeaponProficiency(ProficiencyLevel lvl, EquipmentSubtype name) : base(lvl) { this.type = name; }
public Proficiency(ProficiencyLevel lvl) { level = lvl; }
public SaveProficiency(ProficiencyLevel lvl, AbilityType type) : base(lvl) { this.type = type; }
public SaveProficiencyFeature(AbilityType abilityType, ProficiencyLevel lvl, FeatureBundle parent = null) : base(parent) { this.abilityType = abilityType; this.lvl = lvl; }
public SaveProficiencyFeature(SaveProficiencyFeatureWrapper wrap) { this.abilityType = wrap.abilityType; this.lvl = wrap.lvl; }
public WeaponProficiencyFeature(WeaponProficiencyFeatureWrapper wrap) { this.weaponType = wrap.weaponType; this.lvl = wrap.lvl; }
public WeaponProficiencyFeature(EquipmentSubtype weaponType, ProficiencyLevel lvl, FeatureBundle parent = null) : base(parent) { this.weaponType = weaponType; this.lvl = lvl; }
public ArmourProficiencyFeature(ArmourProficiencyFeatureWrapper wrap) { this.armourType = wrap.armourType; this.lvl = wrap.lvl; }
public ArmourProficiencyFeature(EquipmentType armourType, ProficiencyLevel lvl, FeatureBundle parent = null) : base(parent) { this.armourType = armourType; this.lvl = lvl; }
public void IncProficiency() { Proficiency = (ProficiencyLevel)( ((Int32)Proficiency + 1) % (Int32)ProficiencyLevel.ProficiencyLevelCount); }
private static int HEnumToHInt(ProficiencyLevel pl) { switch (pl) { case ProficiencyLevel.Average: return 2; case ProficiencyLevel.High: return 4; case ProficiencyLevel.Low: return 1; default: return 1; } }
public void DecProficiency() { Proficiency = (ProficiencyLevel)(((Int32)Proficiency - 1) % (Int32)ProficiencyLevel.ProficiencyLevelCount); }
public ArmourProficiency(ProficiencyLevel lvl, EquipmentType name) : base(lvl) { this.type = name; }
public SkillProficiency(ProficiencyLevel lvl, SkillType type) : base(lvl) { this.type = type; }
public SkillProficiencyFeature(SkillType skillType, ProficiencyLevel lvl, FeatureBundle parent = null) : base(parent) { this.skillType = skillType; this.lvl = lvl; }