Sync with L2jServer HighFive Jul 25th 2015.
This commit is contained in:
@@ -24,7 +24,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
|
||||
/**
|
||||
* 18.8.2010 - JIV: Disabling until someone update it
|
||||
@@ -41,7 +41,7 @@ public class CompactionIDFactory extends IdFactory
|
||||
_curOID = FIRST_OID;
|
||||
_freeSize = 0;
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
{
|
||||
Integer[] tmp_obj_ids = extractUsedObjectIDTable();
|
||||
|
||||
|
@@ -30,7 +30,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
|
||||
/**
|
||||
* This class ...
|
||||
@@ -175,7 +175,7 @@ public abstract class IdFactory
|
||||
*/
|
||||
private void setAllCharacterOffline()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement())
|
||||
{
|
||||
s.executeUpdate("UPDATE characters SET online = 0");
|
||||
@@ -192,7 +192,7 @@ public abstract class IdFactory
|
||||
*/
|
||||
private void cleanUpDB()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement stmt = con.createStatement())
|
||||
{
|
||||
long cleanupStart = System.currentTimeMillis();
|
||||
@@ -304,7 +304,7 @@ public abstract class IdFactory
|
||||
|
||||
private void cleanInvalidWeddings()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement())
|
||||
{
|
||||
s.executeUpdate("DELETE FROM mods_wedding WHERE player1Id NOT IN (SELECT charId FROM characters)");
|
||||
@@ -319,7 +319,7 @@ public abstract class IdFactory
|
||||
|
||||
private void cleanUpTimeStamps()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
{
|
||||
int cleanCount = 0;
|
||||
for (String line : TIMESTAMPS_CLEAN)
|
||||
@@ -345,7 +345,7 @@ public abstract class IdFactory
|
||||
protected final Integer[] extractUsedObjectIDTable() throws Exception
|
||||
{
|
||||
final List<Integer> temp = new ArrayList<>();
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement())
|
||||
{
|
||||
|
||||
|
@@ -25,7 +25,7 @@ import java.sql.SQLException;
|
||||
import java.util.Stack;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
|
||||
/**
|
||||
* This class ...
|
||||
@@ -44,7 +44,7 @@ public class StackIDFactory extends IdFactory
|
||||
_curOID = FIRST_OID;
|
||||
_tempOID = FIRST_OID;
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
{
|
||||
// con.createStatement().execute("drop table if exists tmp_obj_id");
|
||||
|
||||
|
Reference in New Issue
Block a user