Sync with L2jServer HighFive Jul 25th 2015.
This commit is contained in:
@ -35,7 +35,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.clan.entry.PledgeApplicantInfo;
|
||||
import com.l2jserver.gameserver.model.clan.entry.PledgeRecruitInfo;
|
||||
@ -93,7 +93,7 @@ public class ClanEntryManager
|
||||
|
||||
private final void load()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rs = s.executeQuery("SELECT * FROM pledge_recruit"))
|
||||
{
|
||||
@ -108,7 +108,7 @@ public class ClanEntryManager
|
||||
_log.warning(getClass().getSimpleName() + ": Exception: ClanEntryManager.load(): " + e.getMessage());
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rs = s.executeQuery("SELECT a.char_id, a.karma, b.base_class, b.level, b.char_name FROM pledge_waiting_list as a LEFT JOIN characters as b ON a.char_id = b.charId"))
|
||||
{
|
||||
@ -124,7 +124,7 @@ public class ClanEntryManager
|
||||
_log.warning(getClass().getSimpleName() + ": Exception: ClanEntryManager.load(): " + e.getMessage());
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rs = s.executeQuery("SELECT a.charId, a.clanId, a.karma, a.message, b.base_class, b.level, b.char_name FROM pledge_applicant as a LEFT JOIN characters as b ON a.charId = b.charId"))
|
||||
{
|
||||
@ -170,7 +170,7 @@ public class ClanEntryManager
|
||||
{
|
||||
final Map<Integer, PledgeApplicantInfo> clanApplicantList = _applicantList.get(clanId);
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(DELETE_APPLICANT))
|
||||
{
|
||||
statement.setInt(1, playerId);
|
||||
@ -191,7 +191,7 @@ public class ClanEntryManager
|
||||
{
|
||||
_applicantList.computeIfAbsent(clanId, k -> new ConcurrentHashMap<>()).put(info.getPlayerId(), info);
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_APPLICANT))
|
||||
{
|
||||
statement.setInt(1, info.getPlayerId());
|
||||
@ -218,7 +218,7 @@ public class ClanEntryManager
|
||||
{
|
||||
if (!_playerLocked.containsKey(playerId))
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_WAITING_LIST))
|
||||
{
|
||||
statement.setInt(1, info.getPlayerId());
|
||||
@ -239,7 +239,7 @@ public class ClanEntryManager
|
||||
{
|
||||
if (_waitingList.containsKey(playerId))
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(DELETE_WAITING_LIST))
|
||||
{
|
||||
statement.setInt(1, playerId);
|
||||
@ -260,7 +260,7 @@ public class ClanEntryManager
|
||||
{
|
||||
if (!_clanList.containsKey(clanId) && !_clanLocked.containsKey(clanId))
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(INSERT_CLAN_RECRUIT))
|
||||
{
|
||||
statement.setInt(1, info.getClanId());
|
||||
@ -282,7 +282,7 @@ public class ClanEntryManager
|
||||
{
|
||||
if (_clanList.containsKey(clanId) && !_clanLocked.containsKey(clanId))
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(UPDATE_CLAN_RECRUIT))
|
||||
{
|
||||
statement.setInt(1, info.getKarma());
|
||||
@ -304,7 +304,7 @@ public class ClanEntryManager
|
||||
{
|
||||
if (_clanList.containsKey(clanId))
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(DELETE_CLAN_RECRUIT))
|
||||
{
|
||||
statement.setInt(1, clanId);
|
||||
|
Reference in New Issue
Block a user