Refactored DatabaseFactory.

This commit is contained in:
MobiusDev
2016-01-11 21:31:45 +00:00
parent d288d505a9
commit 2684901232
140 changed files with 668 additions and 955 deletions

View File

@ -23,7 +23,7 @@ import java.sql.SQLException;
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.instancemanager.SiegeManager;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@ -264,7 +264,7 @@ public class L2ClanMember
*/
public void updatePledgeType()
{
try (Connection con = ConnectionFactory.getInstance().getConnection();
try (Connection con = DatabaseFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE characters SET subpledge=? WHERE charId=?"))
{
ps.setLong(1, _pledgeType);
@ -313,7 +313,7 @@ public class L2ClanMember
*/
public void updatePowerGrade()
{
try (Connection con = ConnectionFactory.getInstance().getConnection();
try (Connection con = DatabaseFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE characters SET power_grade=? WHERE charId=?"))
{
ps.setLong(1, _powerGrade);
@ -840,7 +840,7 @@ public class L2ClanMember
*/
public void saveApprenticeAndSponsor(int apprentice, int sponsor)
{
try (Connection con = ConnectionFactory.getInstance().getConnection();
try (Connection con = DatabaseFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE characters SET apprentice=?,sponsor=? WHERE charId=?"))
{
ps.setInt(1, apprentice);