/// <summary> /// Update the label and tooltip for the character's Armor Rating. /// </summary> /// <param name="lblArmor"></param> /// <param name="tipTooltip"></param> protected void UpdateArmorRating(Label lblArmor, ToolTip tipTooltip, ImprovementManager _objImprovementManager) { // Armor Ratings. lblArmor.Text = _objCharacter.TotalArmorRating.ToString(); string strArmorToolTip = ""; strArmorToolTip = LanguageManager.Instance.GetString("Tip_Armor") + " (" + _objCharacter.ArmorRating.ToString() + ")"; if (_objCharacter.ArmorRating != _objCharacter.TotalArmorRating) strArmorToolTip += " + " + LanguageManager.Instance.GetString("Tip_Modifiers") + " (" + (_objCharacter.TotalArmorRating - _objCharacter.ArmorRating).ToString() + ")"; tipTooltip.SetToolTip(lblArmor, strArmorToolTip); // Remove any Improvements from Armor Encumbrance. _objImprovementManager.RemoveImprovements(Improvement.ImprovementSource.ArmorEncumbrance, "Armor Encumbrance"); // Create the Armor Encumbrance Improvements. if (_objCharacter.ArmorEncumbrance < 0) { _objImprovementManager.CreateImprovement("AGI", Improvement.ImprovementSource.ArmorEncumbrance, "Armor Encumbrance", Improvement.ImprovementType.Attribute, "", 0, 1, 0, 0, _objCharacter.ArmorEncumbrance); _objImprovementManager.CreateImprovement("REA", Improvement.ImprovementSource.ArmorEncumbrance, "Armor Encumbrance", Improvement.ImprovementType.Attribute, "", 0, 1, 0, 0, _objCharacter.ArmorEncumbrance); } }
private void AddFreeSkills(int intFreeLevels) { ImprovementManager manager = new ImprovementManager(_objCharacter); var type = "Aspected Magician".Equals(cboTalents.SelectedValue) ? Improvement.ImprovementType.SkillGroupBase : Improvement.ImprovementType.SkillBase; if (cboSkill1.Visible) { manager.CreateImprovement(cboSkill1.Text, Improvement.ImprovementSource.Heritage, "Heritage", type, "", intFreeLevels); } if (cboSkill2.Visible) { manager.CreateImprovement(cboSkill2.Text, Improvement.ImprovementSource.Heritage, "Heritage", type, "", intFreeLevels); } manager.Commit(); }