Esempio n. 1
0
        private void CreateCharacters()
        {
            _conn.PopulateCharClassTable();
            var clist = _conn.GetCharClasses();
            int i     = 0;

            foreach (var cClass in clist)
            {
                //Create a new Character of the specified class and insert it into the DB
                var pc = new Character();
                pc.CharName = "Nash " + i;
                pc.ClassId  = cClass.ClassId;
                pc.UserId   = _id;
                _conn.InsertCharacter(pc);
                i++;

                //Get the Character back so it has an id and add it to the character list
                var npc = _conn.GetCharacterByName(pc.CharName);
                _clist.Add(npc);
            }
        }