Beispiel #1
0
        public async Task CheckSkill(IUser user, Globals.SkillType skill, int minimum)
        {
            var character = await _charService.GetCharacterAsync(user.Id);

            if (character == null)
            {
                await ReplyAsync(String.Format(Messages.ERR_CHAR_NOT_FOUND, user.Username));

                return;
            }
            if (!_skillsService.AreSkillsSet(character))
            {
                await ReplyAsync(String.Format(Messages.ERR_SKILLS_NOT_FOUND, user.Username));

                return;
            }

            int skillValue = _skillsService.GetSkill(character, skill);

            await ReplyAsync(GetCheckMessage(character.Name, skill.ToString(), skillValue, minimum));
        }