private void CallChangedAll(Trait trait)
 {
     foreach (var item in trait.UsedAttributs())
     {
         AttributeChanged(this, item);
     }
     foreach (var item in trait.UsedValues())
     {
         ValueChanged(this, item);
     }
     foreach (var item in trait.UsedResources())
     {
         ResourceChanged(this, item);
     }
     foreach (var item in trait.GetTawBonus())
     {
         TaWChanged?.Invoke(this, item.Key);
     }
     foreach (var item in trait.GetATBonus())
     {
         ATChanged?.Invoke(this, item.Key);
     }
     foreach (var item in trait.GetPABonus())
     {
         PAChanged?.Invoke(this, item.Key);
     }
     foreach (var item in trait.GetBLBonus())
     {
         BLChanged?.Invoke(this, item.Key);
     }
     APInvestChanged?.Invoke(this, GetAPInvested());
     APEarnedChanged?.Invoke(this, GetAPEarned());
 }
Exemple #2
0
 public void SetTrait(Trait trait)
 {
     viewModel.Trait = trait;
     foreach (var item in trait.GetTawBonus())
     {
         XAML_TaWBonus.NewTalent(true, item.Key, item.Value);
     }
     foreach (var item in trait.GetATBonus())
     {
         XAML_ATBonus.NewTalent(true, item.Key, item.Value);
     }
     foreach (var item in trait.GetPABonus())
     {
         XAML_PABonus.NewTalent(true, item.Key, item.Value);
     }
 }