Package com.gvaneyck.rtmp

Examples of com.gvaneyck.rtmp.TypedObject


        if(!_playerTeam.contains(primarySummoner))
            swapTeams();
       
        _playerChampionSelections = new HashMap<String, LeagueChampion>();
        for(Object o : obj.getArray("playerChampionSelections")) {
            TypedObject to = (TypedObject)o;
            _playerChampionSelections.put(to.getString("summonerInternalName"),
            LeagueChampion.getChampionWithId(to.getInt("championId")));
        }
  _bannedChampions = new HashMap<TeamType, List<LeagueChampion>>();
  for(TeamType t : TeamType.values()) {
      _bannedChampions.put(t, new ArrayList<LeagueChampion>());
  }
  Object[] sortedBans = obj.getArray("bannedChampions");
  Arrays.sort(sortedBans, new Comparator<Object>() {
    public int compare(Object o1, Object o2) {
        TypedObject to1 = (TypedObject)o1;
        TypedObject to2 = (TypedObject)o2;
        return to1.getInt("pickTurn").compareTo(to2.getInt("pickTurn"));
    }
      });
  for(Object o : sortedBans) {
      TypedObject to = (TypedObject)o;
      TeamType teamType = TeamType.getFromId(to.getInt("teamId"));
      LeagueChampion champion = LeagueChampion.getChampionWithId(to.getInt("championId"));
      _bannedChampions.get(teamType).add(champion);
  }
 
    }
View Full Code Here


        _queue = LeagueMatchmakingQueue.valueOf(obj.getString("queue"));
        _leagueName = obj.getString("name");
       
        String requestor = obj.getString("requestorsName");
       
        TypedObject sumObj = null;
        for(Object o : obj.getArray("entries")) {
            if(((TypedObject)o).getString("playerOrTeamName").equalsIgnoreCase(requestor)) {
                sumObj = (TypedObject)o;
                break;
            }
        }
       
        if(sumObj == null)
            throw new LeagueException(LeagueErrorCode.SUMMONER_NOT_FOUND);
       
        _previousDayLeaguePosition = sumObj.getInt("previousDayLeaguePosition");
        _wins = sumObj.getInt("wins");
        _losses = sumObj.getInt("losses");
        _leaguePoints = sumObj.getInt("leaguePoints");
        _tier = LeagueRankedTier.valueOf(sumObj.getString("tier"));
        _rank = LeagueRankedRank.valueOf(sumObj.getString("rank"));
       
        _inactive = sumObj.getBool("inactive");
        _veteran = sumObj.getBool("veteran");
        _hotStreak = sumObj.getBool("hotStreak");
        _freshBlood = sumObj.getBool("freshBlood");
       
        TypedObject miniSeriesObj = sumObj.getTO("miniSeries");
        if(miniSeriesObj != null)
            _miniSeries = new MiniSeries(miniSeriesObj);
    }
View Full Code Here

TOP

Related Classes of com.gvaneyck.rtmp.TypedObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.