Jump to content

Recommended Posts

Posted
===================================================================
com.l2jfrozen.Config.java

@4204
+	public static int SIEGE_DAY;
+	public static void loadSiege()
+	{
+		final String SIEGE = FService.SIEGE_CONFIGURATION_FILE;
+		
+		try
+		{
+			Properties SiegeDay = new Properties();
+			InputStream is = new FileInputStream(new File(SIEGE));
+			SiegeDay.load(is);
+			is.close();
+			
+			SIEGE_DAY = Integer.parseInt(SiegeDay.getProperty("SiegeDay", "14"));
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+			throw new Error("Failed to Load " + SIEGE + " File.");
+		}
+	}
+	
+	
	// ============================================================
	public static boolean SCRIPT_DEBUG;
	public static boolean SCRIPT_ALLOW_COMPILATION;
	public static boolean SCRIPT_CACHE;
	public static boolean SCRIPT_ERROR_LOG;


@4727
			loadEnchantConfig();
			loadBossConfig();
+			loadSiege();
			
===================================================================
gameserver\config\head\siege.properties
+
+#Day to next siege (Retail: SiegeDay = 14)
+SiegeDay = 7
+
# Countdown duration of the siege (in minutes)
SiegeLength = 120

====================================================================
com.l2jfrozen.FService.java
@48
	public static final String SEVENSIGNS_FILE = "./config/head/sevensigns.properties";
-	public static final String SIEGE_CONFIGURATION_FILE = "./config/head/siege.properties";
+	public static final String SIEGE_CONFIGURATION_FILE = "./config/head/siege.properties";
	public static final String ELIT_CLANHALL_CONFIG_FILE = "./config/head/elitclanhall.properties";
	
====================================================================
com.l2jfrozen.gameserver.model.entity.siege.Siege.java
@1682
	private void setNextSiegeDate()
	{
		while (getCastle().getSiegeDate().getTimeInMillis() < Calendar.getInstance().getTimeInMillis())
		{
			// Set next siege date if siege has passed
			// Schedule to happen in 14 days
-			getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 14);
+			getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, Config.SIEGE_DAY);
		}
		
		// Allow registration for next siege
		_isRegistrationOver = false;
	}

 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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