mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Fixup lastLogin in database
This commit is contained in:
parent
3a370a0292
commit
c712be33d8
4 changed files with 5 additions and 4 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -191,10 +191,11 @@ public final class PlayerSession {
|
|||
}
|
||||
PreparedStatement statement;
|
||||
try {
|
||||
statement = connection.prepareStatement("UPDATE members SET online = ? AND lastWorld = ? WHERE username = ?");
|
||||
statement = connection.prepareStatement("UPDATE members SET online = ?, lastWorld = ?, lastLogin = ? WHERE username = ?");
|
||||
statement.setBoolean(1, true);
|
||||
statement.setInt(2, worldId);
|
||||
statement.setString(3, username);
|
||||
statement.setLong(3, System.currentTimeMillis());
|
||||
statement.setString(4, username);
|
||||
statement.execute();
|
||||
SQLManager.close(connection);
|
||||
} catch (SQLException e) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public final class PlayerSQLManager {
|
|||
details.getShop().parsePerks((String) table.getColumn("perks").getValue());
|
||||
details.setRights(Rights.forId((int) table.getColumn("rights").getValue()));
|
||||
details.setDonatorType(DonatorType.forId((int) table.getColumn("donatorType").getValue()));
|
||||
details.setLastLogin((long) table.getColumn("lastLogin").getValue());
|
||||
details.setLastLogin(System.currentTimeMillis());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ public final class PlayerSQLManager {
|
|||
details.getCommunication().save(table);
|
||||
}
|
||||
table.getColumn("bank").updateValue(player.getBank().format());
|
||||
table.getColumn("lastLogin").updateValue(System.currentTimeMillis());
|
||||
table.getColumn("lastLogin").updateValue(player.getDetails().getLastLogin());
|
||||
table.getColumn("ge").updateValue(player.getGrandExchange().format());
|
||||
table.getColumn("inventory").updateValue(player.getInventory().format());
|
||||
table.getColumn("equipment").updateValue(player.getEquipment().format());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue