Example #1
0
        public static CharacterClass GetCharacterClass(int id)
        {
            var vals = Enum.GetValues(typeof(CharacterRace));

            foreach (var val in vals)
            {
                CharacterClass cl = (CharacterClass)val;

                if (cl.GetCharacterClassId() == id)
                {
                    return(cl);
                }
            }

            return(CharacterClass.Mage);
        }