Removal of unnecessary IdFactory releaseId calls.
Contributed by Sahar.
This commit is contained in:
parent
412b805b0e
commit
04b93ce79b
@ -5797,7 +5797,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7595,7 +7594,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7606,7 +7604,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -239,7 +238,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5803,7 +5803,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7602,7 +7601,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7613,7 +7611,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -240,7 +239,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5805,7 +5805,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7604,7 +7603,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7615,7 +7613,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -240,7 +239,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5799,7 +5799,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7598,7 +7597,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7609,7 +7607,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -240,7 +239,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5781,7 +5781,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7580,7 +7579,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7591,7 +7589,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.instancemanager.PremiumManager;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
@ -308,7 +307,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5781,7 +5781,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7580,7 +7579,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7591,7 +7589,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.instancemanager.PremiumManager;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
@ -329,7 +328,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5782,7 +5782,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7581,7 +7580,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7592,7 +7590,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.instancemanager.PremiumManager;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
@ -329,7 +328,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5694,7 +5694,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7489,7 +7488,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7500,7 +7498,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.instancemanager.PremiumManager;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
@ -329,7 +328,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5976,7 +5976,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7780,7 +7779,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7790,7 +7788,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -23,7 +23,6 @@ import java.util.logging.Level;
|
||||
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
@ -162,12 +161,11 @@ public class Mail extends ItemContainer
|
||||
@Override
|
||||
public void deleteMe()
|
||||
{
|
||||
_items.forEach(i ->
|
||||
_items.forEach(item ->
|
||||
{
|
||||
i.updateDatabase(true);
|
||||
i.deleteMe();
|
||||
World.getInstance().removeObject(i);
|
||||
IdFactory.getInstance().releaseId(i.getObjectId());
|
||||
item.updateDatabase(true);
|
||||
item.deleteMe();
|
||||
World.getInstance().removeObject(item);
|
||||
});
|
||||
_items.clear();
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -193,7 +192,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5768,7 +5768,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7566,7 +7565,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7577,7 +7575,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -240,7 +239,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5769,7 +5769,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7567,7 +7566,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7578,7 +7576,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -240,7 +239,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5754,7 +5754,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7552,7 +7551,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7563,7 +7561,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -283,7 +282,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5765,7 +5765,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7579,7 +7578,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7590,7 +7588,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -305,7 +304,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5765,7 +5765,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7579,7 +7578,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7590,7 +7588,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -305,7 +304,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
@ -5662,7 +5662,6 @@ public class PlayerInstance extends Playable
|
||||
|
||||
if (Config.OFFLINE_DISCONNECT_FINISHED && (privateStoreType == PrivateStoreType.NONE) && ((_client == null) || _client.isDetached()))
|
||||
{
|
||||
IdFactory.getInstance().releaseId(getObjectId());
|
||||
Disconnection.of(this).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
@ -7472,7 +7471,6 @@ public class PlayerInstance extends Playable
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_NEW_SKILLS))
|
||||
{
|
||||
con.setAutoCommit(false);
|
||||
for (Skill addSkill : newSkills)
|
||||
{
|
||||
ps.setInt(1, getObjectId());
|
||||
@ -7483,7 +7481,6 @@ public class PlayerInstance extends Playable
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
con.commit();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -305,7 +304,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
final PlayerInstance player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
IdFactory.getInstance().releaseId(player.getObjectId());
|
||||
Disconnection.of(player).storeMe().deleteMe();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user