mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 16:34:56 +01:00
Make sure no player already has the reserved UID when creating and account.
This commit is contained in:
@@ -38,10 +38,18 @@ public final class DatabaseHelper {
|
||||
if (reservedId == GameConstants.SERVER_CONSOLE_UID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Make sure not other accounts has that id as its reservedPlayerId
|
||||
exists = DatabaseHelper.getAccountByPlayerId(reservedId);
|
||||
if (exists != null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Make sure no existing player already has this id.
|
||||
Player existsPlayer = DatabaseHelper.getPlayerByUid(reservedId);
|
||||
if (existsPlayer != null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Account
|
||||
|
||||
Reference in New Issue
Block a user