Sync with L2jServer HighFive Jul 25th 2015.
This commit is contained in:
@@ -39,7 +39,7 @@ import commons.mmocore.MMOConnection;
|
||||
import commons.mmocore.ReceivablePacket;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.LoginServerThread;
|
||||
import com.l2jserver.gameserver.LoginServerThread.SessionKey;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@@ -307,7 +307,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
|
||||
return -1;
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT clanId FROM characters WHERE charId=?"))
|
||||
{
|
||||
statement.setInt(1, objid);
|
||||
@@ -400,7 +400,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
|
||||
return;
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("UPDATE characters SET deletetime=0 WHERE charId=?"))
|
||||
{
|
||||
statement.setInt(1, objid);
|
||||
@@ -429,7 +429,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
|
||||
|
||||
CharNameTable.getInstance().removeName(objid);
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
{
|
||||
try (PreparedStatement ps = con.prepareStatement("DELETE FROM character_contacts WHERE charId=? OR contactId=?"))
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.enums.PrivateStoreType;
|
||||
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jserver.gameserver.model.PcCondOverride;
|
||||
@@ -155,7 +155,7 @@ public final class RequestDestroyItem extends L2GameClientPacket
|
||||
pet.unSummon(activeChar);
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("DELETE FROM pets WHERE item_obj_id=?"))
|
||||
{
|
||||
statement.setInt(1, _objectId);
|
||||
|
@@ -23,7 +23,7 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ public class RequestPetitionFeedback extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_FEEDBACK))
|
||||
{
|
||||
statement.setString(1, player.getName());
|
||||
|
@@ -22,7 +22,7 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
@@ -66,7 +66,7 @@ public final class RequestAnswerFriendInvite extends L2GameClientPacket
|
||||
|
||||
if (_response == 1)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("INSERT INTO character_friends (charId, friendId) VALUES (?, ?), (?, ?)"))
|
||||
{
|
||||
statement.setInt(1, requestor.getObjectId());
|
||||
|
@@ -22,7 +22,7 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -77,7 +77,7 @@ public final class RequestFriendDel extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("DELETE FROM character_friends WHERE (charId=? AND friendId=?) OR (charId=? AND friendId=?)"))
|
||||
{
|
||||
statement.setInt(1, activeChar.getObjectId());
|
||||
|
@@ -22,7 +22,7 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.enums.CategoryType;
|
||||
import com.l2jserver.gameserver.instancemanager.MentorManager;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
@@ -75,7 +75,7 @@ public class ConfirmMenteeAdd extends L2GameClientPacket
|
||||
{
|
||||
if (validate(mentor, mentee))
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("INSERT INTO character_mentees (charId, mentorId) VALUES (?, ?)"))
|
||||
{
|
||||
statement.setInt(1, mentee.getObjectId());
|
||||
|
@@ -27,7 +27,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;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ExperienceData;
|
||||
import com.l2jserver.gameserver.model.CharSelectInfoPackage;
|
||||
@@ -202,7 +202,7 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
private static List<CharSelectInfoPackage> loadCharacterSelectInfo(String loginName)
|
||||
{
|
||||
final List<CharSelectInfoPackage> characterList = new ArrayList<>();
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT * FROM characters WHERE account_name=? ORDER BY createDate"))
|
||||
{
|
||||
statement.setString(1, loginName);
|
||||
@@ -227,7 +227,7 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
|
||||
private static void loadCharacterSubclassInfo(CharSelectInfoPackage charInfopackage, int ObjectId, int activeClassId)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT exp, sp, level, vitality_points FROM character_subclasses WHERE charId=? && class_id=? ORDER BY charId"))
|
||||
{
|
||||
statement.setInt(1, ObjectId);
|
||||
@@ -338,7 +338,7 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
|
||||
if (weaponObjId > 0)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT augAttributes FROM item_attributes WHERE itemId=?"))
|
||||
{
|
||||
statement.setInt(1, weaponObjId);
|
||||
|
Reference in New Issue
Block a user