/// 32.)
 public void KickPlayer(double summonerId, TeamId teamId, TeamDTO.Callback callback)
 {
     TeamDTO cb = new TeamDTO(callback);
     InvokeWithCallback("summonerTeamService", "kickPlayer",
         new object[] { summonerId, teamId.GetBaseTypedObject() }, cb);
 }
 public TeamDTO KickPlayer(double summonerId, TeamId teamId)
 {
     int Id = Invoke("summonerTeamService", "kickPlayer", new object[] { summonerId, teamId.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     TeamDTO result = new TeamDTO(messageBody);
     results.Remove(Id);
     return result;
 }
 public EndOfGameStats GetTeamEndOfGameStats(TeamId arg0, double arg1)
 {
     int Id = Invoke("playerStatsService", "getTeamEndOfGameStats",
         new object[] { arg0.GetBaseTypedObject(), arg1 });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     EndOfGameStats result = new EndOfGameStats(messageBody);
     results.Remove(Id);
     return result;
 }
 /// 27.)
 public void DisbandTeam(TeamId teamId)
 {
     int Id = Invoke("summonerTeamService", "disbandTeam", new object[] { teamId.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     results.Remove(Id);
 }
 /// 25.)
 public TeamAggregatedStatsDTO[] GetTeamAggregatedStats(TeamId arg0)
 {
     int Id = Invoke("playerStatsService", "getTeamAggregatedStats", new object[] { arg0.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     TeamAggregatedStatsDTO[] result =
         new TeamAggregatedStatsDTO[results[Id].GetTO("data").GetArray("body").Length];
     for (int i = 0; i < results[Id].GetTO("data").GetArray("body").Length; i++)
     {
         result[i] = new TeamAggregatedStatsDTO((TypedObject)results[Id].GetTO("data").GetArray("body")[i]);
     }
     results.Remove(Id);
     return result;
 }
 /// 26.)
 public void GetTeamEndOfGameStats(TeamId arg0, double arg1, EndOfGameStats.Callback callback)
 {
     EndOfGameStats cb = new EndOfGameStats(callback);
     InvokeWithCallback("playerStatsService", "getTeamEndOfGameStats",
         new object[] { arg0.GetBaseTypedObject(), arg1 }, cb);
 }
 public void TeamChangeOwner(int arg0, TeamId teamId)
 {
     int Id = Invoke("summonerTeamService", "changeOwner", new object[] { arg0, teamId.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     results.Remove(Id);
     
 }
 /// 23.)
 public void FindTeamById(TeamId teamId, TeamDTO.Callback callback)
 {
     TeamDTO cb = new TeamDTO(callback);
     InvokeWithCallback("summonerTeamService", "findTeamById", new object[] { teamId.GetBaseTypedObject() }, cb);
 }
Beispiel #9
0
 public static string GetTeamRank(this PVPNetConnection conn, TeamId teamId)
 {
     TeamDTO teamDto = conn.FindTeamById(teamId);
     if (teamDto == null || teamDto.Roster == null || teamDto.Roster.MemberList == null)
         return null;
     TeamMemberInfoDTO teamMemberInfoDto = teamDto.Roster.MemberList.FirstOrDefault(infoDto => infoDto.Status == "MEMBER");
     if (teamMemberInfoDto == null)
         return null;
     double firstSummonerId = teamMemberInfoDto.PlayerId;
     SummonerLeaguesDTO leagues = conn.GetAllLeaguesForPlayer(firstSummonerId);
     if (leagues == null)
         return null;
     LeagueListDTO dto =
         leagues.SummonerLeagues.FirstOrDefault(
             listDto => (listDto.Queue == "RANKED_TEAM_5x5" && listDto.RequestorsName == teamDto.Name));
     if (dto == null)
         return "UNRANKED";
     return dto.Tier + " " + dto.RequestorsRank;
 }
Beispiel #10
0
        public static int GetTeamGameCount(this PVPNetConnection conn, TeamId teamId)
        {
            TeamDTO teamDto = conn.FindTeamById(teamId);
            if (teamDto == null)
                return 0;
            TeamStatDetail rankedFivesDetail =
                        teamDto.TeamStatSummary.TeamStatDetails.FirstOrDefault(detail => detail.TeamStatType == "RANKED_TEAM_5x5");

            return rankedFivesDetail != null ? (rankedFivesDetail.Wins + rankedFivesDetail.Losses) : 0;
        }
Beispiel #11
0
 public static DateTime GetTeamLastPlayed(this PVPNetConnection conn, TeamId teamId)
 {
     TeamDTO teamDto = conn.FindTeamById(teamId);
     return teamDto == null ? (DateTime.MinValue) : ((DateTime)teamDto.LastGameDate);
 }
 public async Task<TeamDTO> KickPlayer(Double summonerId, TeamId teamId)
 {
     int Id = Invoke("summonerTeamService", "kickPlayer", new object[] { summonerId, teamId.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     TeamDTO result = new TeamDTO(messageBody);
     results.Remove(Id);
     return result;
 }
 /// 27.)
 public async Task<object> DisbandTeam(TeamId teamId)
 {
     int Id = Invoke("summonerTeamService", "disbandTeam", new object[] { teamId.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     results.Remove(Id);
     return null;
 }
 public async Task<EndOfGameStats> GetTeamEndOfGameStats(TeamId arg0, Double arg1)
 {
     int Id = Invoke("playerStatsService", "getTeamEndOfGameStats",
         new object[] { arg0.GetBaseTypedObject(), arg1 });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     EndOfGameStats result = new EndOfGameStats(messageBody);
     results.Remove(Id);
     return result;
 }
 public async Task<object> TeamChangeOwner(int arg0, TeamId teamId)
 {
     int Id = Invoke("summonerTeamService", "changeOwner", new object[] { arg0, teamId.GetBaseTypedObject() });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     results.Remove(Id);
     return null;
 }