Sync with L2jServer HighFive Jul 25th 2015.
This commit is contained in:
@ -33,7 +33,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.instancemanager.tasks.GrandBossManagerStoreTask;
|
||||
@ -75,7 +75,7 @@ public final class GrandBossManager implements IStorable
|
||||
|
||||
private void init()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rs = s.executeQuery("SELECT * from grandboss_data ORDER BY boss_id"))
|
||||
{
|
||||
@ -129,7 +129,7 @@ public final class GrandBossManager implements IStorable
|
||||
zones.put(zoneId, new ArrayList<>());
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rs = s.executeQuery("SELECT * from grandboss_list ORDER BY player_id"))
|
||||
{
|
||||
@ -237,10 +237,10 @@ public final class GrandBossManager implements IStorable
|
||||
@Override
|
||||
public boolean storeMe()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement delete = con.prepareStatement(DELETE_GRAND_BOSS_LIST))
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement())
|
||||
{
|
||||
delete.executeUpdate();
|
||||
s.executeUpdate(DELETE_GRAND_BOSS_LIST);
|
||||
|
||||
try (PreparedStatement insert = con.prepareStatement(INSERT_GRAND_BOSS_LIST))
|
||||
{
|
||||
@ -310,7 +310,7 @@ public final class GrandBossManager implements IStorable
|
||||
|
||||
private void updateDb(int bossId, boolean statusOnly)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
{
|
||||
L2GrandBossInstance boss = BOSSES.get(bossId);
|
||||
StatsSet info = _storedInfo.get(bossId);
|
||||
|
Reference in New Issue
Block a user