Addition of OlympiadEnabled configuration.
This commit is contained in:
@@ -554,6 +554,7 @@ public class Config
|
||||
public static int WORLD_CHAT_MIN_LEVEL;
|
||||
public static int WORLD_CHAT_POINTS_PER_DAY;
|
||||
public static Duration WORLD_CHAT_INTERVAL;
|
||||
public static boolean OLYMPIAD_ENABLED;
|
||||
public static int ALT_OLY_START_TIME;
|
||||
public static int ALT_OLY_MIN;
|
||||
public static long ALT_OLY_CPERIOD;
|
||||
@@ -2351,6 +2352,7 @@ public class Config
|
||||
|
||||
// Load Olympiad config file (if exists)
|
||||
final PropertiesParser olympiadConfig = new PropertiesParser(OLYMPIAD_CONFIG_FILE);
|
||||
OLYMPIAD_ENABLED = olympiadConfig.getBoolean("OlympiadEnabled", true);
|
||||
ALT_OLY_START_TIME = olympiadConfig.getInt("AltOlyStartTime", 20);
|
||||
ALT_OLY_MIN = olympiadConfig.getInt("AltOlyMin", 0);
|
||||
ALT_OLY_CPERIOD = olympiadConfig.getLong("AltOlyCPeriod", 14400000);
|
||||
|
@@ -95,7 +95,10 @@ public class Hero
|
||||
|
||||
protected Hero()
|
||||
{
|
||||
init();
|
||||
if (Config.OLYMPIAD_ENABLED)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
private void init()
|
||||
|
@@ -132,12 +132,19 @@ public class Olympiad extends ListenersContainer
|
||||
|
||||
protected Olympiad()
|
||||
{
|
||||
load();
|
||||
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.OLYMPIAD_ID);
|
||||
|
||||
if (_period == 0)
|
||||
if (Config.OLYMPIAD_ENABLED)
|
||||
{
|
||||
init();
|
||||
load();
|
||||
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.OLYMPIAD_ID);
|
||||
|
||||
if (_period == 0)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.log(Level.INFO, "Disabled.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user