Carvalho123456 Posted March 16, 2022 Posted March 16, 2022 =================================================================== 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; } 1 Quote
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.