DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
TurnNotifier.get().notifyInTurns(1, new TurnListenerDecorator(this));
}
public void onTurnReached(int currentTurn) {
ReadAchievementsForPlayerCommand command = DBCommandQueue.get().getOneResult(ReadAchievementsForPlayerCommand.class, handle);
if (command == null) {
TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
return;
}
Player p = command.getPlayer();
Set<String> identifiers = command.getIdentifiers();
p.initReachedAchievements();
for (String identifier : identifiers) {
p.addReachedAchievement(identifier);
}
SingletonRepository.getAchievementNotifier().onLogin(command.getPlayer());
}