fixed cases where negative stats were being uploaded
This commit is contained in:
parent
88fe5b3ec6
commit
5d7cc59909
@ -68,6 +68,10 @@ public class GameStatManager implements Listener
|
|||||||
for (String stat : event.GetGame().GetStats().get(player).keySet())
|
for (String stat : event.GetGame().GetStats().get(player).keySet())
|
||||||
{
|
{
|
||||||
int value = event.GetGame().GetStats().get(player).get(stat);
|
int value = event.GetGame().GetStats().get(player).get(stat);
|
||||||
|
|
||||||
|
if (value <= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
Manager.GetStatsManager().incrementStat(player, stat, value);
|
Manager.GetStatsManager().incrementStat(player, stat, value);
|
||||||
|
|
||||||
// Leaderboard hook for logging appropriate stat events
|
// Leaderboard hook for logging appropriate stat events
|
||||||
|
@ -42,7 +42,7 @@ public class ExperienceStatTracker extends StatTracker<Game>
|
|||||||
if (!event.GetGame().Manager.IsRewardStats() || !event.GetGame().Manager.IsRewardAchievements())
|
if (!event.GetGame().Manager.IsRewardStats() || !event.GetGame().Manager.IsRewardAchievements())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_startTime == -1)
|
if (_startTime <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event.GetState() == Game.GameState.End)
|
if (event.GetState() == Game.GameState.End)
|
||||||
|
Loading…
Reference in New Issue
Block a user