Sync with L2jServer HighFive Jul 25th 2015.

This commit is contained in:
MobiusDev
2015-07-26 10:59:25 +00:00
parent 83854bc5e5
commit 1fc14085f5
161 changed files with 2288 additions and 2181 deletions

View File

@@ -27,8 +27,8 @@ import java.util.Base64;
import java.util.Scanner;
import com.l2jserver.Config;
import com.l2jserver.L2DatabaseFactory;
import com.l2jserver.Server;
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
/**
* This class SQL Account Manager
@@ -168,7 +168,7 @@ public class SQLAccountManager
}
q = q.concat(" ORDER BY login ASC");
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
try (Connection con = ConnectionFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement(q);
ResultSet rset = ps.executeQuery())
{
@@ -189,7 +189,7 @@ public class SQLAccountManager
private static void addOrUpdateAccount(String account, String password, String level)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
try (Connection con = ConnectionFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("REPLACE accounts(login, password, accessLevel) VALUES (?, ?, ?)"))
{
MessageDigest md = MessageDigest.getInstance("SHA");
@@ -219,7 +219,7 @@ public class SQLAccountManager
private static void changeAccountLevel(String account, String level)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
try (Connection con = ConnectionFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE accounts SET accessLevel = ? WHERE login = ?"))
{
ps.setString(1, level);
@@ -243,7 +243,7 @@ public class SQLAccountManager
private static void deleteAccount(String account)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
try (Connection con = ConnectionFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("DELETE FROM accounts WHERE login = ?"))
{
ps.setString(1, account);

View File

@@ -32,8 +32,8 @@ import java.util.Properties;
import java.util.ResourceBundle;
import com.l2jserver.Config;
import com.l2jserver.L2DatabaseFactory;
import com.l2jserver.Server;
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
import com.l2jserver.loginserver.GameServerTable;
import com.l2jserver.util.Util;
@@ -98,7 +98,7 @@ public abstract class BaseGameServerRegister
*/
public static void unregisterGameServer(int id) throws SQLException
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
try (Connection con = ConnectionFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("DELETE FROM gameservers WHERE server_id = ?"))
{
@@ -114,7 +114,7 @@ public abstract class BaseGameServerRegister
*/
public static void unregisterAllGameServers() throws SQLException
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
try (Connection con = ConnectionFactory.getInstance().getConnection();
Statement s = con.createStatement())
{
s.executeUpdate("DELETE FROM gameservers");