From ecb38693db76cef84b7ecdddc1792b64b9e06a32 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Mon, 24 Dec 2012 14:57:36 -0800 Subject: [PATCH] Fixing conversions for a long to and int. for user data. --- src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java index aa447e36a..021ba7856 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java @@ -307,7 +307,7 @@ public class PlayerProfile { String tablePrefix = Config.getInstance().getMySQLTablePrefix(); database.write("UPDATE " + tablePrefix + "huds SET hudtype = '" + hudType.toString() + "' WHERE user_id = " + userId); - database.write("UPDATE " + tablePrefix + "users SET lastlogin = " + timestamp.intValue() + " WHERE id = " + userId); + database.write("UPDATE " + tablePrefix + "users SET lastlogin = " + ((int) (timestamp / 1000L)) + " WHERE id = " + userId); database.write("UPDATE " + tablePrefix + "cooldowns SET " + " mining = " + skillsDATS.get(AbilityType.SUPER_BREAKER) + ", woodcutting = " + skillsDATS.get(AbilityType.TREE_FELLER) @@ -418,6 +418,7 @@ public class PlayerProfile { e.printStackTrace(); } } + lastSave = timestamp; } public void addPlayer() {