Package org.napile.primitive.lists

Examples of org.napile.primitive.lists.IntList


   */
  @Override
  protected void runImpl()
  {
    int playerSize = 0;
    IntList deleteChars = Containers.EMPTY_INT_LIST;
    Connection con = null;
    PreparedStatement statement = null;
    ResultSet rset = null;
    try
    {
      con = DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT deletetime FROM characters WHERE account_name=?");
      statement.setString(1, _account);
      rset = statement.executeQuery();
      while (rset.next())
      {
        playerSize++;
        int d = rset.getInt("deletetime");
        if (d > 0)
        {
          if (deleteChars.isEmpty())
          {
            deleteChars = new ArrayIntList(3);
          }
          deleteChars.add(d + (Config.DELETE_DAYS * 24 * 60 * 60));
        }
      }
    }
    catch (Exception e)
    {
      _log.error("GetAccountInfo:runImpl():" + e, e);
    }
    finally
    {
      DbUtils.closeQuietly(con, statement, rset);
    }
    LoginServerCommunication.getInstance().sendPacket(new SetAccountInfo(_account, playerSize, deleteChars.toArray()));
  }
View Full Code Here

TOP

Related Classes of org.napile.primitive.lists.IntList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.