Exemplo n.º 1
0
        //Jogador pede pra participar do time
        public ActionResult TeamCall(int id_team)
        {
            bool result = false;
            Team t      = _teamBLL.TeamSelect(id_team);

            if (t.Id != 0)
            {
                bool aux = t.SubCaptain.Id == 0 ? false : true;

                if (!_teamBLL.TeamIsFull(t.Id, aux) && !_teamBLL.TeamPlayerHasTeam(_sessionHelper.CurrentPlayer.Id))
                {
                    result = _notificationBLL.PlayerCallTeam(t.Captain.Id, _sessionHelper.CurrentPlayer.Id, _sessionHelper.CurrentPlayer.Name);
                }
            }

            return(Json(result));
        }