Example #1
0
 public SavedPetTalentSpec(String name, PetTalentsBase talentSpec, PETFAMILYTREE tree, int pts)
 {
     Name = name;
     Tree = pts;
     if (talentSpec != null)
     {
         Spec  = talentSpec.ToString();
         Class = tree;
     }
 }
Example #2
0
 private void BT_OK_Click(object sender, RoutedEventArgs e)
 {
     if (CB_TalentSpecs.SelectedIndex >= 0)
     {
         SavedPetTalentSpec spec = CB_TalentSpecs.SelectedItem as SavedPetTalentSpec;
         spec.Spec  = PetTalents.ToString();
         spec.Class = (PETFAMILYTREE)CB_Trees.SelectedItem;
         spec.Tree  = Tree;
     }
     else
     {
         SavedPetTalentSpec.AllSpecs.Add(new SavedPetTalentSpec(TB_NewSpecName.Text, PetTalents, (PETFAMILYTREE)CB_Trees.SelectedItem, Tree));
     }
     this.DialogResult = true;
 }