Jump to content
  • 0

How to..?


Skacazh
 Share

Question

8 answers to this question

Recommended Posts

  • 1
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.

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0
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?

Link to comment
Share on other sites

  • 0
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..

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock