예제 #1
0
        public void SetNewUserData(int age, string genderName, int raceId, List <Skill> skills = null, List <Item> items = null, List <Item> itemsInShop = null, List <Skill> skillsInShop = null, List <Boss> bosses = null)
        {
            ItemController  itemController  = new ItemController(CurrentUser);
            BossController  bossController  = new BossController(CurrentUser);
            SkillController skillController = new SkillController(CurrentUser);
            ShopController  shopController  = new ShopController(CurrentUser);

            CurrentUser.Age    = age;
            CurrentUser.Gender = new Gender(RenameGender(genderName));
            items              = itemController.DefaultItems(CurrentUser.Name, raceId);
            skills             = skillController.AddSkills(raceId);
            CurrentUser.Items  = items;
            CurrentUser.Rase   = new Rase(raceId);
            CurrentUser.Skills = skills;
            itemsInShop        = shopController.AddItem(raceId);
            skillsInShop       = shopController.AddSkills(raceId);
            shopController.Save();
            SetValueForRace(raceId);
            bosses             = bossController.AddBosess();
            CurrentUser.Bosses = bosses;
            itemController.SaveItems();
            bossController.Save();
            Save();
        }