@Override
  protected final boolean checkVillageMasterRace(PlayerClass pclass) {
    if (pclass == null) {
      return false;
    }

    return pclass.isOfRace(Race.HUMAN) || pclass.isOfRace(Race.ELF);
  }
Beispiel #2
0
  public static final EnumSet<PlayerClass> getSet(Race race, ClassLevel level) {
    EnumSet<PlayerClass> allOf = EnumSet.noneOf(PlayerClass.class);

    for (PlayerClass playerClass : EnumSet.allOf(PlayerClass.class)) {
      if ((race == null) || playerClass.isOfRace(race)) {
        if ((level == null) || playerClass.isOfLevel(level)) {
          allOf.add(playerClass);
        }
      }
    }
    return allOf;
  }