Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void LOAD_CHAR_KOLI() {
- try {
- long time = System.currentTimeMillis();
- int i = 0;
- ResultSet RS = executeQuery("SELECT * from personnages ORDER BY victoirek DESC LIMIT 3000;", Config.DB_NAME, 0);
- World.LadderByKoli.clear();
- while (RS.next()) {
- World.addLadderPlayerKoli(new LadderPlayer(RS.getInt("guid"), RS.getInt("level"), RS.getString("name"), RS.getInt("honor"), RS.getInt("class"), RS.getLong("xp"), RS.getInt("sexe"), RS.getLong("kamas"), RS.getInt("victoirek"), RS.getInt("defaitek"), RS.getInt("alignement"), RS.getInt("title"), RS.getInt("victoirea"), RS.getInt("defaitea"), RS.getInt("victoired"), RS.getInt("defaited"), RS.getInt("coteKoli"), RS.getInt("coteDuplum")));
- i++;
- //System.out.print((RS.getInt("id")) + " - ");
- }
- closeResultSet(RS);
- System.out.println(i + " Characters koli loaded in " + (System.currentTimeMillis() - time) + "ms");
- } catch (SQLException e) {
- Logs.addToLog("SQL ERROR: " + e.getMessage());
- e.printStackTrace();
- }
- }
- public static void LOAD_CHAR_XP() {
- try {
- synchronized (World.LadderByExp) {
- long time = System.currentTimeMillis();
- int i = 0;
- ResultSet RS = executeQuery("SELECT * from personnages ORDER BY xp DESC LIMIT 3000;", Config.DB_NAME, 0);
- World.LadderByExp.clear();
- while (RS.next()) {
- World.addLadderPlayerEXP(new LadderPlayer(RS.getInt("guid"), RS.getInt("level"), RS.getString("name"), RS.getInt("honor"), RS.getInt("class"), RS.getLong("xp"), RS.getInt("sexe"), RS.getLong("kamas"), RS.getInt("victoirek"), RS.getInt("defaitek"), RS.getInt("alignement"), RS.getInt("title"), RS.getInt("victoirea"), RS.getInt("defaitea"), RS.getInt("victoired"), RS.getInt("defaited"), RS.getInt("coteKoli"), RS.getInt("coteDuplum")));
- i++;
- //System.out.print((RS.getInt("id")) + " - ");
- }
- closeResultSet(RS);
- System.out.println(i + " Characters exp loaded in " + (System.currentTimeMillis() - time) + "ms");
- }
- } catch (SQLException e) {
- Logs.addToLog("SQL ERROR: " + e.getMessage());
- e.printStackTrace();
- }
- }
- public static void LOAD_CHAR_HONOR() {
- try {
- synchronized (World.LadderByHonor) {
- long time = System.currentTimeMillis();
- int i = 0;
- ResultSet RS = executeQuery("SELECT * from personnages ORDER BY honor DESC LIMIT 3000;", Config.DB_NAME, 0);
- World.LadderByHonor.clear();
- while (RS.next()) {
- World.addLadderPlayerHonor(new LadderPlayer(RS.getInt("guid"), RS.getInt("level"), RS.getString("name"), RS.getInt("honor"), RS.getInt("class"), RS.getLong("xp"), RS.getInt("sexe"), RS.getLong("kamas"), RS.getInt("victoirek"), RS.getInt("defaitek"), RS.getInt("alignement"), RS.getInt("title"), RS.getInt("victoirea"), RS.getInt("defaitea"), RS.getInt("victoired"), RS.getInt("defaited"), RS.getInt("coteKoli"), RS.getInt("coteDuplum")));
- //World.LadderByHonor.put
- i++;
- //System.out.print((RS.getInt("id")) + " - ");
- }
- closeResultSet(RS);
- System.out.println(i + " Characters honor loaded in " + (System.currentTimeMillis() - time) + "ms");
- }
- } catch (SQLException e) {
- Logs.addToLog("SQL ERROR: " + e.getMessage());
- e.printStackTrace();
- }
- }
- public static void LOAD_CHAR_DUP() {
- try {
- long time = System.currentTimeMillis();
- int i = 0;
- ResultSet RS = executeQuery("SELECT * from personnages ORDER BY coteDuplum DESC LIMIT 3000;", Config.DB_NAME, 0);
- World.LadderByDuplum.clear();
- while (RS.next()) {
- World.addLadderPlayerDuplum(new LadderPlayer(RS.getInt("guid"), RS.getInt("level"), RS.getString("name"), RS.getInt("honor"), RS.getInt("class"), RS.getLong("xp"), RS.getInt("sexe"), RS.getLong("kamas"), RS.getInt("victoirek"), RS.getInt("defaitek"), RS.getInt("alignement"), RS.getInt("title"), RS.getInt("victoirea"), RS.getInt("defaitea"), RS.getInt("victoired"), RS.getInt("defaited"), RS.getInt("coteKoli"), RS.getInt("coteDuplum")));
- i++;
- //System.out.print((RS.getInt("id")) + " - ");
- }
- closeResultSet(RS);
- System.out.println(i + " Characters koli loaded in " + (System.currentTimeMillis() - time) + "ms");
- } catch (SQLException e) {
- Logs.addToLog("SQL ERROR: " + e.getMessage());
- e.printStackTrace();
- }
- }
- ublic static void LOAD_CHAR_KOLI() {
- try {
- long time = System.currentTimeMillis();
- int i = 0;
- ResultSet RS = executeQuery("SELECT * from personnages ORDER BY victoirek DESC LIMIT 3000;", Config.DB_NAME, 0);
- World.LadderByKoli.clear();
- while (RS.next()) {
- World.addLadderPlayerKoli(new LadderPlayer(RS.getInt("guid"), RS.getInt("level"), RS.getString("name"), RS.getInt("honor"), RS.getInt("class"), RS.getLong("xp"), RS.getInt("sexe"), RS.getLong("kamas"), RS.getInt("victoirek"), RS.getInt("defaitek"), RS.getInt("alignement"), RS.getInt("title"), RS.getInt("victoirea"), RS.getInt("defaitea"), RS.getInt("victoired"), RS.getInt("defaited"), RS.getInt("coteKoli"), RS.getInt("coteDuplum")));
- i++;
- //System.out.print((RS.getInt("id")) + " - ");
- }
- closeResultSet(RS);
- System.out.println(i + " Characters koli loaded in " + (System.currentTimeMillis() - time) + "ms");
- } catch (SQLException e) {
- Logs.addToLog("SQL ERROR: " + e.getMessage());
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement