Esempio n. 1
0
        public async Task ExitCombat()
        {
            ContextIds idList = new ContextIds(Context);
            var        user   = UserHandler.GetUser(Context.User.Id);

            //Tests each case to make sure all circumstances for the execution of this command are valid (character exists, in correct location)
            try
            {
                await UserHandler.UserNotInCombat(idList);
            }
            catch (InvalidUserStateException)
            {
                return;
            }

            var inst = CombatHandler.GetInstance(user.CombatID);

            await CombatHandler.RemovePlayerFromCombat(inst, user);
        }