Sync with L2jServer HighFive Jul 25th 2015.
This commit is contained in:
@ -25,7 +25,7 @@ import java.sql.SQLException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.enums.MailType;
|
||||
import com.l2jserver.gameserver.instancemanager.MailManager;
|
||||
import com.l2jserver.gameserver.model.entity.Message;
|
||||
@ -63,7 +63,7 @@ public class TaskBirthday extends Task
|
||||
private int giveBirthdayGifts(long lastActivation)
|
||||
{
|
||||
int birthdayGiftCount = 0;
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(SELECT_PENDING_BIRTHDAY_GIFTS))
|
||||
{
|
||||
ps.setLong(1, TimeUnit.SECONDS.convert(lastActivation, TimeUnit.MILLISECONDS));
|
||||
|
@ -21,7 +21,7 @@ package com.l2jserver.gameserver.taskmanager.tasks;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.taskmanager.Task;
|
||||
import com.l2jserver.gameserver.taskmanager.TaskManager;
|
||||
import com.l2jserver.gameserver.taskmanager.TaskManager.ExecutedTask;
|
||||
@ -46,7 +46,7 @@ public class TaskDailySkillReuseClean extends Task
|
||||
@Override
|
||||
public void onTimeElapsed(ExecutedTask task)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
{
|
||||
for (int skill_id : _daily_skills)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExWorldChatCnt;
|
||||
@ -45,7 +45,7 @@ public class TaskDailyWorldChatPointReset extends Task
|
||||
public void onTimeElapsed(ExecutedTask task)
|
||||
{
|
||||
// Update data for offline players.
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE character_variables SET val = ? WHERE var = ?"))
|
||||
{
|
||||
ps.setInt(1, Config.WORLD_CHAT_POINTS_PER_DAY);
|
||||
|
@ -21,7 +21,7 @@ package com.l2jserver.gameserver.taskmanager.tasks;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.taskmanager.Task;
|
||||
import com.l2jserver.gameserver.taskmanager.TaskManager;
|
||||
import com.l2jserver.gameserver.taskmanager.TaskManager.ExecutedTask;
|
||||
@ -43,7 +43,7 @@ public class TaskRecom extends Task
|
||||
@Override
|
||||
public void onTimeElapsed(ExecutedTask task)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
{
|
||||
try (PreparedStatement ps = con.prepareStatement("UPDATE character_reco_bonus SET rec_left=?, time_left=?, rec_have=0 WHERE rec_have <= 20"))
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ import java.util.Calendar;
|
||||
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.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.stat.PcStat;
|
||||
@ -57,7 +57,7 @@ public class TaskVitalityReset extends Task
|
||||
player.setVitalityPoints(PcStat.MAX_VITALITY_POINTS, false);
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement st = con.prepareStatement("DELETE FROM account_gsdata WHERE var = ?"))
|
||||
{
|
||||
st.setString(1, PcStat.VITALITY_VARIABLE);
|
||||
|
Reference in New Issue
Block a user