示例#1
0
  public SystemHeroLevel getSystemHeroLevelByLevel(int color, int level) {
    List<SystemHeroLevel> levelList = super.getValue(color);
    for (SystemHeroLevel heroLevel : levelList) {
      if (heroLevel.getLevel() == level) return heroLevel;
    }

    return null;
  }
示例#2
0
  public SystemHeroLevel getSystemHeroLevel(int color, int exp) {
    SystemHeroLevel systemHeroLevel = null;
    List<SystemHeroLevel> levelList = super.getValue(color);
    for (SystemHeroLevel level : levelList) {
      if (systemHeroLevel == null) {
        systemHeroLevel = level;
      } else {
        if (level.getExp() <= exp && level.getLevel() > systemHeroLevel.getLevel()) {
          systemHeroLevel = level;
        }
      }
    }

    return systemHeroLevel;
  }
示例#3
0
 @Override
 protected Integer getCacheKey(SystemHeroLevel v) {
   return v.getColor();
 }