Sync with L2jServer HighFive Jul 25th 2015.
This commit is contained in:
@@ -25,7 +25,7 @@ import java.util.Calendar;
|
||||
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.idfactory.IdFactory;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Couple
|
||||
{
|
||||
_Id = coupleId;
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("SELECT * FROM mods_wedding WHERE id = ?"))
|
||||
{
|
||||
ps.setInt(1, _Id);
|
||||
@@ -87,7 +87,7 @@ public class Couple
|
||||
_weddingDate = Calendar.getInstance();
|
||||
_weddingDate.setTimeInMillis(Calendar.getInstance().getTimeInMillis());
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("INSERT INTO mods_wedding (id, player1Id, player2Id, married, affianceDate, weddingDate) VALUES (?, ?, ?, ?, ?, ?)"))
|
||||
{
|
||||
_Id = IdFactory.getInstance().getNextId();
|
||||
@@ -107,7 +107,7 @@ public class Couple
|
||||
|
||||
public void marry()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE mods_wedding set married = ?, weddingDate = ? where id = ?"))
|
||||
{
|
||||
ps.setBoolean(1, true);
|
||||
@@ -125,7 +125,7 @@ public class Couple
|
||||
|
||||
public void divorce()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("DELETE FROM mods_wedding WHERE id=?"))
|
||||
{
|
||||
ps.setInt(1, _Id);
|
||||
|
||||
Reference in New Issue
Block a user