Prevent players receiving attendance rewards in the same day.

This commit is contained in:
MobiusDevelopment
2019-04-05 07:04:54 +00:00
parent db26087118
commit 61e2ee1f24
10 changed files with 20 additions and 20 deletions

View File

@ -13994,12 +13994,12 @@ public final class PlayerInstance extends Playable
{
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
{
getAccountVariables().set(ATTENDANCE_DATE_VAR, System.currentTimeMillis());
getAccountVariables().set(ATTENDANCE_DATE_VAR, System.currentTimeMillis() + 86400000); // Now + 24 hours.
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
}
else
{
getVariables().set(ATTENDANCE_DATE_VAR, System.currentTimeMillis());
getVariables().set(ATTENDANCE_DATE_VAR, System.currentTimeMillis() + 86400000); // Now + 24 hours.
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
}
}