Jump to content
  • 0

Question

8 answers to this question

Recommended Posts

  • 1
Posted
52 minutes ago, Skacazh said:

This is how looks full code:

 


final SystemMessage sm = new SystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED);
        sm.addNumber(_currentCycle);
        
        Announcements.getInstance().announceToAll(sm);
        
        final Calendar currentTime = Calendar.getInstance();
        currentTime.add(Calendar.MONTH, 1);
        currentTime.set(Calendar.DAY_OF_MONTH, 1);
        currentTime.set(Calendar.AM_PM, Calendar.AM);
        currentTime.set(Calendar.HOUR, 12);
        currentTime.set(Calendar.MINUTE, 0);
        currentTime.set(Calendar.SECOND, 0);
        _olympiadEnd = currentTime.getTimeInMillis();
        
        final Calendar nextChange = Calendar.getInstance();
        _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
        scheduleWeeklyChange();
    }

 

how must be?

this code say hero period end every 1 month first day = 1 hours 12 = morning min = 0 second = 0
so you remove this
        currentTime.add(Calendar.MONTH, 1);
        currentTime.set(Calendar.DAY_OF_MONTH, 1);
        currentTime.set(Calendar.AM_PM, Calendar.AM);
        currentTime.set(Calendar.HOUR, 12);
        currentTime.set(Calendar.MINUTE, 0);
        currentTime.set(Calendar.SECOND, 0);

and you put this
        currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
        currentTime.set(Calendar.HOUR_OF_DAY, 00);
        currentTime.set(Calendar.MINUTE, 00);
        currentTime.set(Calendar.SECOND, 00);

and thats all.

  • 0
Posted

Calendar currentTime = Calendar.getInstance();
        currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
        currentTime.set(Calendar.HOUR_OF_DAY, 00);
        currentTime.set(Calendar.MINUTE, 00);
        currentTime.set(Calendar.SECOND, 00);
 

Search all files in olympiad packet with lines such these. Then replace them with the ones i gave you.

  • 0
Posted
On 8/20/2018 at 6:56 PM, Solomun said:

Calendar currentTime = Calendar.getInstance();
        currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
        currentTime.set(Calendar.HOUR_OF_DAY, 00);
        currentTime.set(Calendar.MINUTE, 00);
        currentTime.set(Calendar.SECOND, 00);
 

Search all files in olympiad packet with lines such these. Then replace them with the ones i gave you.

This is how looks full code:

 

final SystemMessage sm = new SystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED);
        sm.addNumber(_currentCycle);
        
        Announcements.getInstance().announceToAll(sm);
        
        final Calendar currentTime = Calendar.getInstance();
        currentTime.add(Calendar.MONTH, 1);
        currentTime.set(Calendar.DAY_OF_MONTH, 1);
        currentTime.set(Calendar.AM_PM, Calendar.AM);
        currentTime.set(Calendar.HOUR, 12);
        currentTime.set(Calendar.MINUTE, 0);
        currentTime.set(Calendar.SECOND, 0);
        _olympiadEnd = currentTime.getTimeInMillis();
        
        final Calendar nextChange = Calendar.getInstance();
        _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
        scheduleWeeklyChange();
    }

 

how must be?

  • 0
Posted
7 minutes ago, Solomun said:

Did you delete the previous record in database? I think olympiad_data is the table.

on frozen in navicat only olympiad_nobles and olympiad_nobles_eom.

But have i configs Olympiad.cfg file with that:

1d419ce62494e72da12529b9b22b6613837.png

before i don't deleted anything..

Guest
This topic is now closed to further replies.


×
×
  • Create New...