Removal of unnecessary IdFactory releaseId calls.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment
2019-10-10 18:52:20 +00:00
parent 412b805b0e
commit 04b93ce79b
31 changed files with 4 additions and 81 deletions

View File

@@ -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)
{

View File

@@ -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();
}
}