Refactored DatabaseFactory.
This commit is contained in:
@ -26,7 +26,7 @@ import java.util.Base64;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.LoginServerThread;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SecondaryAuthData;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient;
|
||||
@ -71,7 +71,7 @@ public class SecondaryPasswordAuth
|
||||
private void loadPassword()
|
||||
{
|
||||
String var, value = null;
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(SELECT_PASSWORD))
|
||||
{
|
||||
statement.setString(1, _activeClient.getAccountName());
|
||||
@ -116,7 +116,7 @@ public class SecondaryPasswordAuth
|
||||
|
||||
password = cryptPassword(password);
|
||||
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_PASSWORD))
|
||||
{
|
||||
statement.setString(1, _activeClient.getAccountName());
|
||||
@ -135,7 +135,7 @@ public class SecondaryPasswordAuth
|
||||
|
||||
public boolean insertWrongAttempt(int attempts)
|
||||
{
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_ATTEMPT))
|
||||
{
|
||||
statement.setString(1, _activeClient.getAccountName());
|
||||
@ -174,7 +174,7 @@ public class SecondaryPasswordAuth
|
||||
|
||||
newPassword = cryptPassword(newPassword);
|
||||
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(UPDATE_PASSWORD))
|
||||
{
|
||||
statement.setString(1, newPassword);
|
||||
|
Reference in New Issue
Block a user