Organized config file definitions.
This commit is contained in:
@@ -82,27 +82,27 @@ public final class Config
|
||||
// Config File Definitions
|
||||
// --------------------------------------------------
|
||||
public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini";
|
||||
public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini";
|
||||
public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini";
|
||||
public static final String FORTSIEGE_CONFIGURATION_FILE = "./config/FortSiege.ini";
|
||||
public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini";
|
||||
public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini";
|
||||
public static final String GENERAL_CONFIG_FILE = "./config/General.ini";
|
||||
public static final String HEXID_FILE = "./config/hexid.txt";
|
||||
public static final String ID_CONFIG_FILE = "./config/IdFactory.ini";
|
||||
public static final String LOGIN_CONFIGURATION_FILE = "./config/LoginServer.ini";
|
||||
public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini";
|
||||
public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini";
|
||||
public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini";
|
||||
public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini";
|
||||
public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini";
|
||||
public static final String MMO_CONFIG_FILE = "./config/MMO.ini";
|
||||
public static final String NPC_CONFIG_FILE = "./config/NPC.ini";
|
||||
public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini";
|
||||
public static final String PVP_CONFIG_FILE = "./config/PVP.ini";
|
||||
public static final String RATES_CONFIG_FILE = "./config/Rates.ini";
|
||||
public static final String CONFIGURATION_FILE = "./config/Server.ini";
|
||||
public static final String IP_CONFIG_FILE = "./config/ipconfig.xml";
|
||||
public static final String SIEGE_CONFIGURATION_FILE = "./config/Siege.ini";
|
||||
public static final String TELNET_FILE = "./config/Telnet.ini";
|
||||
public static final String FLOOD_PROTECTOR_FILE = "./config/FloodProtector.ini";
|
||||
public static final String MMO_CONFIG_FILE = "./config/MMO.ini";
|
||||
public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini";
|
||||
public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini";
|
||||
public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini";
|
||||
public static final String SERVER_CONFIG_FILE = "./config/Server.ini";
|
||||
public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini";
|
||||
public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini";
|
||||
public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt";
|
||||
public static final String CH_SIEGE_FILE = "./config/ConquerableHallSiege.ini";
|
||||
public static final String GEODATA_FILE = "./config/GeoEngine.ini";
|
||||
public static final String HEXID_FILE = "./config/hexid.txt";
|
||||
public static final String IPCONFIG_FILE = "./config/ipconfig.xml";
|
||||
|
||||
// --------------------------------------------------
|
||||
// Custom Config File Definitions
|
||||
@@ -1125,7 +1125,7 @@ public final class Config
|
||||
|
||||
/**
|
||||
* This class initializes all global variables for configuration.<br>
|
||||
* If the key doesn't appear in properties file, a default value is set by this class. {@link #CONFIGURATION_FILE} (properties file) for configuring your server.
|
||||
* If the key doesn't appear in properties file, a default value is set by this class. {@link #SERVER_CONFIG_FILE} (properties file) for configuring your server.
|
||||
*/
|
||||
public static void load()
|
||||
{
|
||||
@@ -1148,7 +1148,7 @@ public final class Config
|
||||
FLOOD_PROTECTOR_CHARACTER_SELECT = new FloodProtectorConfig("CharacterSelectFloodProtector");
|
||||
FLOOD_PROTECTOR_ITEM_AUCTION = new FloodProtectorConfig("ItemAuctionFloodProtector");
|
||||
|
||||
final PropertiesParser serverSettings = new PropertiesParser(CONFIGURATION_FILE);
|
||||
final PropertiesParser serverSettings = new PropertiesParser(SERVER_CONFIG_FILE);
|
||||
|
||||
GAMESERVER_HOSTNAME = serverSettings.getString("GameserverHostname", "0.0.0.0");
|
||||
PORT_GAME = serverSettings.getInt("GameserverPort", 7777);
|
||||
@@ -1651,7 +1651,7 @@ public final class Config
|
||||
ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10_000_000);
|
||||
|
||||
// Load Telnet config file (if exists)
|
||||
final PropertiesParser telnetSettings = new PropertiesParser(TELNET_FILE);
|
||||
final PropertiesParser telnetSettings = new PropertiesParser(TELNET_CONFIG_FILE);
|
||||
|
||||
TELNET_ENABLED = telnetSettings.getBoolean("EnableTelnet", false);
|
||||
TELNET_PORT = telnetSettings.getInt("Port", 12345);
|
||||
@@ -1669,7 +1669,7 @@ public final class Config
|
||||
MMO_TCP_NODELAY = mmoSettings.getBoolean("TcpNoDelay", false);
|
||||
|
||||
// Load IdFactory config file (if exists)
|
||||
final PropertiesParser IdFactory = new PropertiesParser(ID_CONFIG_FILE);
|
||||
final PropertiesParser IdFactory = new PropertiesParser(IDFACTORY_CONFIG_FILE);
|
||||
|
||||
IDFACTORY_TYPE = IdFactory.getEnum("IDFactory", IdFactoryType.class, IdFactoryType.BitSet);
|
||||
BAD_ID_CHECKING = IdFactory.getBoolean("BadIdChecking", true);
|
||||
@@ -1853,7 +1853,7 @@ public final class Config
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
|
||||
// Load FloodProtector config file
|
||||
final PropertiesParser FloodProtectors = new PropertiesParser(FLOOD_PROTECTOR_FILE);
|
||||
final PropertiesParser FloodProtectors = new PropertiesParser(FLOOD_PROTECTOR_CONFIG_FILE);
|
||||
|
||||
loadFloodProtectorConfigs(FloodProtectors);
|
||||
|
||||
@@ -2245,7 +2245,7 @@ public final class Config
|
||||
LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e);
|
||||
}
|
||||
|
||||
final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_FILE);
|
||||
final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE);
|
||||
|
||||
CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500);
|
||||
CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4);
|
||||
@@ -2254,7 +2254,7 @@ public final class Config
|
||||
CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0);
|
||||
CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0);
|
||||
|
||||
final PropertiesParser geoData = new PropertiesParser(GEODATA_FILE);
|
||||
final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE);
|
||||
|
||||
GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/");
|
||||
COORD_SYNCHRONIZE = geoData.getInt("CoordSynchronize", -1);
|
||||
@@ -2677,7 +2677,7 @@ public final class Config
|
||||
}
|
||||
else if (Server.serverMode == Server.MODE_LOGINSERVER)
|
||||
{
|
||||
final PropertiesParser ServerSettings = new PropertiesParser(LOGIN_CONFIGURATION_FILE);
|
||||
final PropertiesParser ServerSettings = new PropertiesParser(LOGIN_CONFIG_FILE);
|
||||
|
||||
GAME_SERVER_LOGIN_HOST = ServerSettings.getString("LoginHostname", "127.0.0.1");
|
||||
GAME_SERVER_LOGIN_PORT = ServerSettings.getInt("LoginPort", 9013);
|
||||
@@ -2965,11 +2965,11 @@ public final class Config
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
final File f = new File(IP_CONFIG_FILE);
|
||||
final File f = new File(IPCONFIG_FILE);
|
||||
if (f.exists())
|
||||
{
|
||||
LOGGER.info("Network Config: ipconfig.xml exists using manual configuration...");
|
||||
parseFile(new File(IP_CONFIG_FILE));
|
||||
parseFile(new File(IPCONFIG_FILE));
|
||||
}
|
||||
else
|
||||
// Auto configuration...
|
||||
@@ -2997,7 +2997,7 @@ public final class Config
|
||||
|
||||
if (_hosts.size() != _subnets.size())
|
||||
{
|
||||
LOGGER.warning("Failed to Load " + IP_CONFIG_FILE + " File - subnets does not match server addresses.");
|
||||
LOGGER.warning("Failed to Load " + IPCONFIG_FILE + " File - subnets does not match server addresses.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3005,7 +3005,7 @@ public final class Config
|
||||
final Node att = n.getAttributes().getNamedItem("address");
|
||||
if (att == null)
|
||||
{
|
||||
LOGGER.warning("Failed to load " + IP_CONFIG_FILE + " file - default server address is missing.");
|
||||
LOGGER.warning("Failed to load " + IPCONFIG_FILE + " file - default server address is missing.");
|
||||
_hosts.add("127.0.0.1");
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user