Esempio n. 1
0
 public List<ChampionSkinDTO> getSkinsForChampion(Integer championId) {
   for (ChampionDTO champ : getAvailableChampions()) {
     if (champ.getChampionId().equals(championId)) {
       return champ.getChampionSkins();
     }
   }
   return null;
 }
Esempio n. 2
0
  // return the list of champ available for this game
  public List<ChampionDTO> getAvailableChampions(GameDTO game) {
    // get the champs
    List<ChampionDTO> champs = new ArrayList<ChampionDTO>(getAvailableChampions());
    // inactive champs switch
    // TODO: check that champ.isActive() is enough to know what champs are active or not
    //		List<Integer> inactiveChamps =
    // getLoginDataPacketForUser().getClientSystemStates().getInactiveChampionIdList();

    Iterator<ChampionDTO> iterator = champs.iterator();
    while (iterator.hasNext()) {
      ChampionDTO champ = iterator.next();
      // if champ inactive or if I don't own him
      if (!champ.isActive()
          || (!champ.isFreeToPlay()
              && !champ.isOwned()) /*|| inactiveChamps.contains(champ.getChampionId())*/) {
        iterator.remove();
      }
    }

    return champs;
  }