Refactored DatabaseFactory.
This commit is contained in:
@@ -33,7 +33,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
@@ -417,7 +417,7 @@ public final class FourSepulchersManager
|
||||
{
|
||||
_mysteriousBoxSpawns.clear();
|
||||
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY id"))
|
||||
{
|
||||
ps.setInt(1, 0);
|
||||
@@ -474,7 +474,7 @@ public final class FourSepulchersManager
|
||||
_physicalMonsters.clear();
|
||||
|
||||
int loaded = 0;
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"))
|
||||
{
|
||||
ps1.setInt(1, 1);
|
||||
@@ -521,7 +521,7 @@ public final class FourSepulchersManager
|
||||
_magicalMonsters.clear();
|
||||
|
||||
int loaded = 0;
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"))
|
||||
{
|
||||
ps1.setInt(1, 2);
|
||||
@@ -570,7 +570,7 @@ public final class FourSepulchersManager
|
||||
_archonSpawned.clear();
|
||||
|
||||
int loaded = 0;
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"))
|
||||
{
|
||||
ps1.setInt(1, 5);
|
||||
@@ -621,7 +621,7 @@ public final class FourSepulchersManager
|
||||
_emperorsGraveNpcs.clear();
|
||||
|
||||
int loaded = 0;
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps1 = con.prepareStatement("SELECT Distinct key_npc_id FROM four_sepulchers_spawnlist Where spawntype = ? ORDER BY key_npc_id"))
|
||||
{
|
||||
ps1.setInt(1, 6);
|
||||
|
Reference in New Issue
Block a user