mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-17 07:02:53 -04:00
Added null parent destination check for cell permissions, Deprecated checkForReservedNames, Fixed characters not in odb showing up in characters datatable, Removed updating of highestid in datatables until persistence is fixed in odb's
This commit is contained in:
@@ -838,22 +838,23 @@ public class ObjectService implements INetworkDispatch {
|
||||
|
||||
// stack overflow when using recursion
|
||||
long newId = 0;
|
||||
try {
|
||||
//try {
|
||||
synchronized(objectMutex) {
|
||||
newId = highestId.get();
|
||||
newId = highestId.incrementAndGet();
|
||||
ObjectDatabase objectIdODB = core.getObjectIdODB();
|
||||
while (objectList.containsKey(newId) || objectIdODB.contains(newId)) {
|
||||
newId = highestId.incrementAndGet();
|
||||
}
|
||||
//System.out.println("Got an objid.");
|
||||
}
|
||||
final String sql = "UPDATE highestid SET id=? WHERE id=(SELECT MAX(id) FROM highestid)";
|
||||
/*final String sql = "UPDATE highestid SET id=? WHERE id=(SELECT MAX(id) FROM highestid)";
|
||||
final PreparedStatement ps2 = databaseConnection.preparedStatement(sql);
|
||||
ps2.setLong(1, newId);
|
||||
ps2.executeUpdate();
|
||||
ps2.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}*/
|
||||
|
||||
return newId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user