Exemplo n.º 1
0
 string getSubClass(SubClass c)
 {
     //Because a class/object can be null but an enum/type cannot be null,
     //there needs to be a check here but not in other places.
     if (c != null)
     {
         return c.GetDescription();
     }
     else
     {
         return String.Empty;
     }
 }
Exemplo n.º 2
0
 private void combo_SubClass_SelectedIndexChanged(object sender, EventArgs e)
 {
     Classes selClass = combo_Class.SelectedItem.ToString().ParseEnum<Classes>();
     string selSub = combo_Prestige.SelectedItem.ToString();
     SubClass subC = new SubClass(selClass, selSub);
     checkSpellCasting(selClass, subC);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the subclass based on the string value entered.
 /// </summary>
 /// <param name="c"></param>
 public void setSubClass(string c, SubClassTypes t)
 {
     switch(t)
     {
         case SubClassTypes.PrimalPaths:
             pPrestige = new SubClass(c.ParseEnum<PrimalPaths>());
             break;
         case SubClassTypes.BardColleges:
             pPrestige = new SubClass(c.ParseEnum<BardColleges>());
             break;
         case SubClassTypes.DivineDomains:
             pPrestige = new SubClass(c.ParseEnum<DivineDomains>());
             break;
         case SubClassTypes.DruidCircles:
             pPrestige = new SubClass(c.ParseEnum<DruidCircles>());
             break;
         case SubClassTypes.MartialArchetypes:
             pPrestige = new SubClass(c.ParseEnum<MartialArchetypes>());
             break;
         case SubClassTypes.MonasticTraditions:
             pPrestige = new SubClass(c.ParseEnum<MonasticTraditions>());
             break;
         case SubClassTypes.SacredOaths:
             pPrestige = new SubClass(c.ParseEnum<SacredOaths>());
             break;
         case SubClassTypes.RangerArchetypes:
             pPrestige = new SubClass(c.ParseEnum<RangerArchetypes>());
             break;
         case SubClassTypes.RoguishArchetypes:
             pPrestige = new SubClass(c.ParseEnum<RoguishArchetypes>());
             break;
         case SubClassTypes.SorcerousOrigins:
             pPrestige = new SubClass(c.ParseEnum<SorcerousOrigins>());
             break;
         case SubClassTypes.OtherworldlyPatrons:
             pPrestige = new SubClass(c.ParseEnum<OtherworldlyPatrons>());
             break;
         case SubClassTypes.ArcaneTraditions:
             pPrestige = new SubClass(c.ParseEnum<ArcaneTraditions>());
             break;
         default:
             pPrestige = new SubClass();
             break;
     }
 }
Exemplo n.º 4
0
 private void checkSpellCasting(Classes c, SubClass s)
 {
     switch (c)
     {
         case Classes.Fighter:
             if(s.GetDescription() == "Eldritch Knight")
             {
                 tempIsCaster = true;
             }
             break;
         case Classes.Monk:
             if(s.GetDescription() == "Way of the Four Elements")
             {
                 tempIsCaster = true;
             }
             break;
         case Classes.Rogue:
             if(s.GetDescription() == "Arcane Trickster")
             {
                 tempIsCaster = true;
             }
             break;
         default:
             break;
     }
     tab_CharSpells.Enabled = tempIsCaster;
 }