Exemplo n.º 1
0
  @SuppressWarnings("unused")
  @Scheduled(name = "NPC_GATHER_REBIRTH", value = "*/1 * * * * *")
  private void processNpcSchedule() {
    if (handleNpcSet == null || handleNpcSet.isEmpty()) {
      return;
    }
    List<Npc> npcList = null;
    synchronized (handleNpcSet) {
      npcList = new ArrayList<Npc>(handleNpcSet);
    }

    for (Npc npc : npcList) {
      Collection<GameMap> gameMaps = npc.getTimeOutGameMap(handleNpcSet);
      if (gameMaps != null && gameMaps.size() > 0) {
        for (GameMap gameMap : gameMaps) {
          handleCollect(gameMap, npc, true, 0);
        }
      }
    }
  }