ensured that exp cannot be given multiple times for a game
This commit is contained in:
parent
d5515d11b2
commit
d6ade5a15b
@ -12,7 +12,7 @@ import nautilus.game.arcade.game.GemData;
|
||||
|
||||
public class ExperienceStatTracker extends StatTracker<Game>
|
||||
{
|
||||
private long _startTime;
|
||||
private long _startTime = -1;
|
||||
|
||||
public ExperienceStatTracker(Game game)
|
||||
{
|
||||
@ -32,6 +32,9 @@ public class ExperienceStatTracker extends StatTracker<Game>
|
||||
if (!event.GetGame().Manager.IsRewardStats() || !event.GetGame().Manager.IsRewardAchievements())
|
||||
return;
|
||||
|
||||
if (_startTime == -1)
|
||||
return;
|
||||
|
||||
if (event.GetState() == Game.GameState.End)
|
||||
{
|
||||
List<Player> winners = getGame().getWinners();
|
||||
@ -70,6 +73,8 @@ public class ExperienceStatTracker extends StatTracker<Game>
|
||||
addStat(player, "ExpEarned", expGained, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
_startTime = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user