-Dropped Javolution.
-Removal of Q00344_1000YearsTheEndOfLamentation. -Fixed starting conditions for Q00144_PailakaInjuredDragon. -Fixed starting conditions for last Seven Sign quests. -Added missing MonasteryOfSilence.xml instance spawns and doors. -Removed many catacomb spawns.
This commit is contained in:
@@ -22,12 +22,11 @@ import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
|
||||
/**
|
||||
@@ -36,7 +35,7 @@ import com.l2jserver.Config;
|
||||
public abstract class FloodProtectedListener extends Thread
|
||||
{
|
||||
private final Logger _log = Logger.getLogger(FloodProtectedListener.class.getName());
|
||||
private final Map<String, ForeignConnection> _floodProtection = new FastMap<>();
|
||||
private final Map<String, ForeignConnection> _floodProtection = new HashMap<>();
|
||||
private ServerSocket _serverSocket;
|
||||
|
||||
public FloodProtectedListener(String listenIp, int port) throws IOException
|
||||
|
@@ -20,10 +20,9 @@ package com.l2jserver.loginserver;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
|
||||
/**
|
||||
@@ -31,7 +30,7 @@ import com.l2jserver.Config;
|
||||
*/
|
||||
public class GameServerListener extends FloodProtectedListener
|
||||
{
|
||||
private static List<GameServerThread> _gameServers = new FastList<>();
|
||||
private static List<GameServerThread> _gameServers = new ArrayList<>();
|
||||
|
||||
public GameServerListener() throws IOException
|
||||
{
|
||||
|
@@ -19,8 +19,6 @@
|
||||
package com.l2jserver.loginserver;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
@@ -36,9 +34,12 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.io.UTF8StreamReader;
|
||||
import javolution.xml.stream.XMLStreamConstants;
|
||||
import javolution.xml.stream.XMLStreamReaderImpl;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
@@ -81,29 +82,29 @@ public final class GameServerTable
|
||||
*/
|
||||
private void loadGameServerNames()
|
||||
{
|
||||
final File xml = new File(Config.DATAPACK_ROOT, "data/servername.xml");
|
||||
try (InputStream in = new FileInputStream(xml);
|
||||
UTF8StreamReader utf8 = new UTF8StreamReader())
|
||||
final File file = new File(Config.DATAPACK_ROOT + "/data/servername.xml");
|
||||
final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
|
||||
try
|
||||
{
|
||||
final XMLStreamReaderImpl xpp = new XMLStreamReaderImpl();
|
||||
xpp.setInput(utf8.setInput(in));
|
||||
for (int e = xpp.getEventType(); e != XMLStreamConstants.END_DOCUMENT; e = xpp.next())
|
||||
final DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
||||
final Document document = documentBuilder.parse(file);
|
||||
final Node node = document.getFirstChild();
|
||||
for (Node n = node.getFirstChild(); n != null; n = n.getNextSibling())
|
||||
{
|
||||
if (e == XMLStreamConstants.START_ELEMENT)
|
||||
if (n.getNodeName().equals("server"))
|
||||
{
|
||||
if (xpp.getLocalName().toString().equals("server"))
|
||||
{
|
||||
Integer id = Integer.valueOf(xpp.getAttributeValue(null, "id").toString());
|
||||
String name = xpp.getAttributeValue(null, "name").toString();
|
||||
_serverNames.put(id, name);
|
||||
}
|
||||
NamedNodeMap attrs = n.getAttributes();
|
||||
|
||||
int id = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());
|
||||
String name = attrs.getNamedItem("name").getNodeValue();
|
||||
|
||||
_serverNames.put(id, name);
|
||||
}
|
||||
}
|
||||
xpp.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.info(getClass().getSimpleName() + ": Cannot load " + xml.getAbsolutePath() + "!");
|
||||
_log.info(getClass().getSimpleName() + ": Cannot load servername.xml!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,13 +444,20 @@ public final class GameServerTable
|
||||
{
|
||||
switch (_status)
|
||||
{
|
||||
case 0: return "Auto";
|
||||
case 1: return "Good";
|
||||
case 2: return "Normal";
|
||||
case 3: return "Full";
|
||||
case 4: return "Down";
|
||||
case 5: return "GM Only";
|
||||
default: return "Unknown";
|
||||
case 0:
|
||||
return "Auto";
|
||||
case 1:
|
||||
return "Good";
|
||||
case 2:
|
||||
return "Normal";
|
||||
case 3:
|
||||
return "Full";
|
||||
case 4:
|
||||
return "Down";
|
||||
case 5:
|
||||
return "GM Only";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,11 +26,10 @@ import java.net.Socket;
|
||||
import java.security.KeyPair;
|
||||
import java.security.interfaces.RSAPrivateKey;
|
||||
import java.security.interfaces.RSAPublicKey;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastSet;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.loginserver.GameServerTable.GameServerInfo;
|
||||
import com.l2jserver.loginserver.network.L2JGameServerPacketHandler;
|
||||
@@ -64,7 +63,7 @@ public class GameServerThread extends Thread
|
||||
private GameServerInfo _gsi;
|
||||
|
||||
/** Authed Clients on a GameServer */
|
||||
private final Set<String> _accountsOnGameServer = new FastSet<>();
|
||||
private final Set<String> _accountsOnGameServer = new HashSet<>();
|
||||
|
||||
private String _connectionIPAddress;
|
||||
|
||||
|
@@ -35,13 +35,12 @@ import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.loginserver.GameServerTable.GameServerInfo;
|
||||
@@ -62,10 +61,10 @@ public class LoginController
|
||||
public static final int LOGIN_TIMEOUT = 60 * 1000;
|
||||
|
||||
/** Authed Clients on LoginServer */
|
||||
protected FastMap<String, L2LoginClient> _loginServerClients = new FastMap<String, L2LoginClient>().shared();
|
||||
protected ConcurrentHashMap<String, L2LoginClient> _loginServerClients = new ConcurrentHashMap<>();
|
||||
|
||||
private final Map<InetAddress, Integer> _failedLoginAttemps = new HashMap<>();
|
||||
private final Map<InetAddress, Long> _bannedIps = new FastMap<InetAddress, Long>().shared();
|
||||
private final Map<InetAddress, Long> _bannedIps = new ConcurrentHashMap<>();
|
||||
|
||||
protected ScrambledKeyPair[] _keyPairs;
|
||||
|
||||
|
Reference in New Issue
Block a user