Prevent players receiving attendance rewards in the same day.
This commit is contained in:
+2
-2
@@ -14178,12 +14178,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -14236,12 +14236,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -14250,12 +14250,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -14239,12 +14239,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -14239,12 +14239,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -14245,12 +14245,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -14003,12 +14003,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -14010,12 +14010,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -13994,12 +13994,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -13994,12 +13994,12 @@ public final class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ATTENDANCE_REWARDS_SHARE_ACCOUNT)
|
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);
|
getAccountVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
else
|
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);
|
getVariables().set(ATTENDANCE_INDEX_VAR, rewardIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user