Use statement batches to prevent SQL interruptions.
Contributed by Sahar.
This commit is contained in:
parent
ebf1e85cce
commit
f5ac4e313f
@ -7220,9 +7220,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setBoolean(6, subClass.isDualClass());
|
||||
statement.setInt(7, getObjectId());
|
||||
statement.setInt(8, subClass.getClassIndex());
|
||||
statement.execute();
|
||||
statement.clearParameters();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7312,8 +7312,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7343,9 +7344,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7375,9 +7377,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setDouble(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1051,10 +1051,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(4, skill.getSubLevel());
|
||||
ps2.setInt(5, info.getTime());
|
||||
ps2.setInt(6, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().computeIfAbsent(getControlObjectId(), k -> new CopyOnWriteArrayList<>()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -353,7 +353,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
// XXX: Rework me!
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().containsKey(getOwner().getObjectId()))
|
||||
@ -371,6 +371,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7227,9 +7227,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setBoolean(6, subClass.isDualClass());
|
||||
statement.setInt(7, getObjectId());
|
||||
statement.setInt(8, subClass.getClassIndex());
|
||||
statement.execute();
|
||||
statement.clearParameters();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7319,8 +7319,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7350,9 +7351,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7382,9 +7384,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setDouble(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1051,10 +1051,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(4, skill.getSubLevel());
|
||||
ps2.setInt(5, info.getTime());
|
||||
ps2.setInt(6, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().computeIfAbsent(getControlObjectId(), k -> new CopyOnWriteArrayList<>()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -353,7 +353,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
// XXX: Rework me!
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().containsKey(getOwner().getObjectId()))
|
||||
@ -371,6 +371,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7229,9 +7229,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setBoolean(6, subClass.isDualClass());
|
||||
statement.setInt(7, getObjectId());
|
||||
statement.setInt(8, subClass.getClassIndex());
|
||||
statement.execute();
|
||||
statement.clearParameters();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7321,8 +7321,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7352,9 +7353,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7384,9 +7386,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setDouble(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1051,10 +1051,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(4, skill.getSubLevel());
|
||||
ps2.setInt(5, info.getTime());
|
||||
ps2.setInt(6, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().computeIfAbsent(getControlObjectId(), k -> new CopyOnWriteArrayList<>()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -353,7 +353,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
// XXX: Rework me!
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().containsKey(getOwner().getObjectId()))
|
||||
@ -371,6 +371,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7226,9 +7226,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setBoolean(6, subClass.isDualClass());
|
||||
statement.setInt(7, getObjectId());
|
||||
statement.setInt(8, subClass.getClassIndex());
|
||||
statement.execute();
|
||||
statement.clearParameters();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7318,8 +7318,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7349,9 +7350,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7381,9 +7383,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setDouble(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1051,10 +1051,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(4, skill.getSubLevel());
|
||||
ps2.setInt(5, info.getTime());
|
||||
ps2.setInt(6, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().computeIfAbsent(getControlObjectId(), k -> new CopyOnWriteArrayList<>()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -353,7 +353,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
// XXX: Rework me!
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().containsKey(getOwner().getObjectId()))
|
||||
@ -371,6 +371,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7389,10 +7389,9 @@ public final class L2PcInstance extends L2Playable
|
||||
ps.setInt(4, subClass.getClassId());
|
||||
ps.setInt(5, getObjectId());
|
||||
ps.setInt(6, subClass.getClassIndex());
|
||||
|
||||
ps.execute();
|
||||
ps.clearParameters();
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7468,8 +7467,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(7, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(8, getClassIndex());
|
||||
statement.setInt(9, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7498,9 +7498,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(7, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(8, getClassIndex());
|
||||
statement.setInt(9, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7530,9 +7531,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setLong(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1028,10 +1028,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(3, skill.getLevel());
|
||||
ps2.setInt(4, info.getTime());
|
||||
ps2.setInt(5, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().addPetEffect(getControlObjectId(), skill, info.getTime());
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -274,10 +274,11 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().addServitorEffect(getOwner(), getReferenceSkill(), skill, info.getTime());
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7192,9 +7192,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setBoolean(6, subClass.isDualClass());
|
||||
statement.setInt(7, getObjectId());
|
||||
statement.setInt(8, subClass.getClassIndex());
|
||||
statement.execute();
|
||||
statement.clearParameters();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7284,8 +7284,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7315,9 +7316,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7347,9 +7349,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setDouble(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1051,10 +1051,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(4, skill.getSubLevel());
|
||||
ps2.setInt(5, info.getTime());
|
||||
ps2.setInt(6, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().computeIfAbsent(getControlObjectId(), k -> new CopyOnWriteArrayList<>()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -353,7 +353,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
// XXX: Rework me!
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().containsKey(getOwner().getObjectId()))
|
||||
@ -371,6 +371,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7192,9 +7192,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setBoolean(6, subClass.isDualClass());
|
||||
statement.setInt(7, getObjectId());
|
||||
statement.setInt(8, subClass.getClassIndex());
|
||||
statement.execute();
|
||||
statement.clearParameters();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7284,8 +7284,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7315,9 +7316,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7347,9 +7349,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setDouble(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1051,10 +1051,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(4, skill.getSubLevel());
|
||||
ps2.setInt(5, info.getTime());
|
||||
ps2.setInt(6, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().computeIfAbsent(getControlObjectId(), k -> new CopyOnWriteArrayList<>()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -353,7 +353,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
// XXX: Rework me!
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().containsKey(getOwner().getObjectId()))
|
||||
@ -371,6 +371,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7194,9 +7194,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setBoolean(6, subClass.isDualClass());
|
||||
statement.setInt(7, getObjectId());
|
||||
statement.setInt(8, subClass.getClassIndex());
|
||||
statement.execute();
|
||||
statement.clearParameters();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -7286,8 +7286,9 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 0); // Store type 0, active buffs/debuffs.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
|
||||
// Skills under reuse.
|
||||
@ -7317,9 +7318,10 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setInt(8, 1); // Restore type 1, skill reuse.
|
||||
statement.setInt(9, getClassIndex());
|
||||
statement.setInt(10, ++buff_index);
|
||||
statement.execute();
|
||||
statement.addBatch();
|
||||
}
|
||||
}
|
||||
statement.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -7349,9 +7351,10 @@ public final class L2PcInstance extends L2Playable
|
||||
ps2.setInt(3, ts.getItemObjectId());
|
||||
ps2.setLong(4, ts.getReuse());
|
||||
ps2.setDouble(5, ts.getStamp());
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
}
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1051,10 +1051,11 @@ public class L2PetInstance extends L2Summon
|
||||
ps2.setInt(4, skill.getSubLevel());
|
||||
ps2.setInt(5, info.getTime());
|
||||
ps2.setInt(6, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().computeIfAbsent(getControlObjectId(), k -> new CopyOnWriteArrayList<>()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -353,7 +353,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
ps2.setInt(5, skill.getLevel());
|
||||
ps2.setInt(6, info.getTime());
|
||||
ps2.setInt(7, ++buff_index);
|
||||
ps2.execute();
|
||||
ps2.addBatch();
|
||||
|
||||
// XXX: Rework me!
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().containsKey(getOwner().getObjectId()))
|
||||
@ -371,6 +371,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(new SummonEffect(skill, info.getTime()));
|
||||
}
|
||||
ps2.executeBatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user