Exemplo n.º 1
0
 public HeroAdminPerkVM(PerkObject perk, bool isSelected, HeroAdminPerkVM.PerkAlternativeType alternativeType, Action <PerkObject, bool> onPerkSelectedChange)
 {
     this.AlternativeType       = (int)alternativeType;
     this.Perk                  = perk;
     this._onPerkSelectedChange = onPerkSelectedChange;
     this.PerkId                = "SPPerks\\" + perk.StringId;
     this.Level                 = (int)perk.RequiredSkillValue;
     this.LevelText             = ((int)perk.RequiredSkillValue).ToString();
     this.Hint                  = new BasicTooltipViewModel(() => CampaignUIHelper.GetPerkEffectText(perk, true));
     this._perkConceptObj       = Concept.All.SingleOrDefault(c => c.StringId == "str_game_objects_perks");
     if (isSelected)
     {
         this.CurrentState = HeroAdminPerkVM.PerkStates.EarnedAndActive;
     }
     else
     {
         this.CurrentState = HeroAdminPerkVM.PerkStates.EarnedButNotSelected;
     }
 }