hello,
If i change SQL query, the siege date will be every x days?
public void saveSiegeDate()
{
if (_scheduledStartSiegeTask != null)
{
_scheduledStartSiegeTask.cancel(true);
_scheduledStartSiegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
}
Connection con = null;
PreparedStatement statement = null;
try
{
con = L2DatabaseFactory.getInstance().getConnection();
statement = con.prepareStatement("UPDATE castle SET siegeDate = ?, regTimeEnd = ?, regTimeOver = ? WHERE id = ?");
statement.setLong(1, getSiegeDate().getTimeInMillis());
statement.setLong(2, getTimeRegistrationOverDate().getTimeInMillis());
statement.setString(3, String.valueOf(getIsTimeRegistrationOver()));
statement.setInt(4, getCastle().getCastleId());
statement.execute();
}
catch (Exception e)
{
_log.log(Level.WARNING, "Exception: saveSiegeDate(): " + e.getMessage(), e);
}
finally
{
L2DatabaseFactory.close(con);
}
}
If i replace
statement.setLong(1, getSiegeDate().getTimeInMillis());
by
statement.setLong(1, 259200000);
259200000 = 3 days.
The sieges will be every 3 days?
L2j H5.
Cordially,
Bleadd