[Fix] Fixed error in time calculation in Health

Issue: monthAgo - twoWeeksAgo players time is 0
Cause: twoWeeksAgo calculated wrong, being BEFORE monthAgo
Fix:   Move parenthesis

Affected issues: #741
This commit is contained in:
Rsl1122 2018-10-14 22:19:38 +03:00
parent a757bf7334
commit fa34a6c0e6
2 changed files with 6 additions and 6 deletions

View File

@ -262,7 +262,7 @@
<exclude>org.mockito:*</exclude>
<exclude>org.easymock:*</exclude>
<exclude>junit:*</exclude>
<!--<exclued>org.slf4j:*</exclued>-->
<exclued>org.slf4j:*</exclued>
</excludes>
</artifactSet>
<relocations>
@ -285,10 +285,10 @@
<pattern>com.zaxxer</pattern>
<shadedPattern>plan.com.zaxxer</shadedPattern>
</relocation>
<relocation>
<pattern>org.slf4j</pattern>
<shadedPattern>plan.org.slf4j</shadedPattern>
</relocation>
<!--<relocation>-->
<!--<pattern>org.slf4j</pattern>-->
<!--<shadedPattern>plan.org.slf4j</shadedPattern>-->
<!--</relocation>-->
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>com.djrapitops.plan.utilities.metrics</shadedPattern>

View File

@ -116,7 +116,7 @@ public abstract class AbstractHealthInfo {
protected void activePlayerPlaytimeChange(PlayersMutator playersMutator) {
PlayersMutator currentlyActive = playersMutator.filterActive(now, activeMinuteThreshold, activeLoginThreshold, 1.75);
long twoWeeksAgo = (now - (now - monthAgo)) / 2L;
long twoWeeksAgo = now - ((now - monthAgo) / 2L);
long totalFourToTwoWeeks = 0;
long totalLastTwoWeeks = 0;