Jump to content
  • 0

[Help]Weekly Sieges


Question

Posted

I've searched everywhere and there was no good answer..

 

How can i change the sieges to happen every week...

I know a little about java, but i can't find WHERE to modify this.

 

Someone give me a light please!

13 answers to this question

Recommended Posts

  • 0
Posted

getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);

if i change 7 to 1... it will be weekly?

 

i didn't understood this very well.

  • 0
Posted

/** Set the date for the next siege. */
private void setNextSiegeDate()
{
	while (getCastle().getSiegeDate().getTimeInMillis() < Calendar.getInstance().getTimeInMillis())
	{
if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY && getCastle().getSiegeDat().get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY)
			getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
		// from CT2.3 Castle sieges are on Sunday, but if server admins allow to set day of the siege
		// then sieges can occur on Saturdays as well11.			if (getCastle().getSiegeDate().get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY && !Config.CL_SET_SIEGE_TIME_LIST.contains("day"))
			getCastle().getSiegeDate().set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
		// set the next siege day to the next weekend
		getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);
	}

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..