*/
@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()));
}