|
@@ -14,6 +14,7 @@
|
|
*/
|
|
*/
|
|
package com.l2jserver;
|
|
package com.l2jserver;
|
|
|
|
|
|
|
|
+import gnu.trove.TIntArrayList;
|
|
import gnu.trove.TIntFloatHashMap;
|
|
import gnu.trove.TIntFloatHashMap;
|
|
import gnu.trove.TIntIntHashMap;
|
|
import gnu.trove.TIntIntHashMap;
|
|
import gnu.trove.TIntObjectHashMap;
|
|
import gnu.trove.TIntObjectHashMap;
|
|
@@ -812,8 +813,7 @@ public final class Config
|
|
public static boolean ACCEPT_ALTERNATE_ID;
|
|
public static boolean ACCEPT_ALTERNATE_ID;
|
|
public static int REQUEST_ID;
|
|
public static int REQUEST_ID;
|
|
public static boolean RESERVE_HOST_ON_LOGIN = false;
|
|
public static boolean RESERVE_HOST_ON_LOGIN = false;
|
|
- public static int MIN_PROTOCOL_REVISION;
|
|
|
|
- public static int MAX_PROTOCOL_REVISION;
|
|
|
|
|
|
+ public static TIntArrayList PROTOCOL_LIST;
|
|
public static boolean LOG_LOGIN_CONTROLLER;
|
|
public static boolean LOG_LOGIN_CONTROLLER;
|
|
|
|
|
|
//--------------------------------------------------
|
|
//--------------------------------------------------
|
|
@@ -999,13 +999,20 @@ public final class Config
|
|
MAX_CHARACTERS_NUMBER_PER_ACCOUNT = Integer.parseInt(serverSettings.getProperty("CharMaxNumber", "0"));
|
|
MAX_CHARACTERS_NUMBER_PER_ACCOUNT = Integer.parseInt(serverSettings.getProperty("CharMaxNumber", "0"));
|
|
MAXIMUM_ONLINE_USERS = Integer.parseInt(serverSettings.getProperty("MaximumOnlineUsers", "100"));
|
|
MAXIMUM_ONLINE_USERS = Integer.parseInt(serverSettings.getProperty("MaximumOnlineUsers", "100"));
|
|
|
|
|
|
- MIN_PROTOCOL_REVISION = Integer.parseInt(serverSettings.getProperty("MinProtocolRevision", "660"));
|
|
|
|
- MAX_PROTOCOL_REVISION = Integer.parseInt(serverSettings.getProperty("MaxProtocolRevision", "665"));
|
|
|
|
-
|
|
|
|
- if (MIN_PROTOCOL_REVISION > MAX_PROTOCOL_REVISION)
|
|
|
|
|
|
+ String[] protocols = serverSettings.getProperty("AllowedProtocolRevisions", "146;152").split(";");
|
|
|
|
+ PROTOCOL_LIST = new TIntArrayList(protocols.length);
|
|
|
|
+ for (String protocol : protocols)
|
|
{
|
|
{
|
|
- throw new Error("MinProtocolRevision is bigger than MaxProtocolRevision in server configuration file.");
|
|
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ PROTOCOL_LIST.add(Integer.parseInt(protocol.trim()));
|
|
|
|
+ }
|
|
|
|
+ catch(NumberFormatException e)
|
|
|
|
+ {
|
|
|
|
+ _log.info("Wrong config protocol version: "+protocol+". Skipped.");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
{
|
|
{
|