DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
TurnNotifier.get().notifyInTurns(1, new TurnListenerDecorator(this));
}
public void onTurnReached(int currentTurn) {
ReadPendingAchievementDetailsCommand command = DBCommandQueue.get().getOneResult(ReadPendingAchievementDetailsCommand.class, handle);
if (command == null) {
TurnNotifier.get().notifyInTurns(0, new TurnListenerDecorator(this));
return;
}
Player player = command.getPlayer();
updateElfPrincessAchievement(player, command.getDetails("quest.special.elf_princess.0025"));
updateItemLoots(player, command.getDetails("item.set.black"));
updateItemLoots(player, command.getDetails("item.set.chaos"));
updateItemLoots(player, command.getDetails("item.set.shadow"));
updateItemLoots(player, command.getDetails("item.set.golden"));
updateItemLoots(player, command.getDetails("item.set.red"));
// Could also check for reached achievements here. This is also checked on login but the order may vary due to the async access?
// delete the entries. We don't need feedback
DBCommand deletecommand = new DeletePendingAchievementDetailsCommand(player);