What is wrong ? no error at build but no effect in game.
I want something like EventInterval = 21:00,22:00,1:00
private AZStartTask _task;
class AZStartTask implements Runnable
{
private long _startTime;
public AZStartTask(long startTime)
{
_startTime = startTime;
}
public void setStartTime(long startTime)
{
_startTime = startTime;
}
public void run()
{
startEvent();
}
}
public void scheduleEventStart()
{
try
{
Calendar currentTime = Calendar.getInstance();
Calendar nextStartTime = null;
Calendar testStartTime = null;
for (String timeOfDay : Config.EVENT_INTERVAL)
{
// Creating a Calendar object from the specified interval value
testStartTime = Calendar.getInstance();
testStartTime.setLenient(true);
String[] splitTimeOfDay = timeOfDay.split(":");
testStartTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(splitTimeOfDay[0]));
testStartTime.set(Calendar.MINUTE, Integer.parseInt(splitTimeOfDay[1]));
// If the date is in the past, make it the next day (Example: Checking for "1:00", when the time is 23:57.)
if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis())
{
testStartTime.add(Calendar.DAY_OF_MONTH, 1);
}
// Check for the test date to be the minimum (smallest in the specified list)
if (nextStartTime == null || testStartTime.getTimeInMillis() < nextStartTime.getTimeInMillis())
{
nextStartTime = testStartTime;
}
}
_task = new AZStartTask(nextStartTime.getTimeInMillis());
ThreadPoolManager.getInstance().executeTask(_task);
}
catch (Exception e)
{ }
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
It doesn't say that anywhere.
https://acis.i-live.eu/index.php?topic=30.0
check it from source java file names
example in 367 ->
https://acis.i-live.eu/index.php?topic=30.255 l2bufferinstance renamed to schemebuffer | l2pcinstance renamed to player
check changeset 367 to understand
Question
xAddytzu
What is wrong ? no error at build but no effect in game.
I want something like EventInterval = 21:00,22:00,1:00
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.