Exemplo n.º 1
0
            public async Task <RuntimeResult> SpendSkillPointsAsync(Skill skill)
            {
                if (ExperienceService.UseOldProgression)
                {
                    return(StatisticResult.UsingOldProgression());
                }

                var userInfo  = Context.User;
                var character = await _charService.GetCharacterAsync(userInfo.Id);

                if (character == null)
                {
                    return(CharacterResult.CharacterNotFound());
                }
                if (!_skillsService.AreSkillsSet(character))
                {
                    return(StatisticResult.SkillsNotSet());
                }

                return(_skillsService.UpgradeSkill(character, skill));
            }