AvatarDAO.updateLevel(avatar);
} catch (SQLException ex) {
System.err.println(ex.getMessage());
}
ResponseUpdateLevel updateLevelResponse = new ResponseUpdateLevel();
updateLevelResponse.setAmount(newLevel - oldLevel);
updateLevelResponse.setLevel(newLevel);
String range = String.valueOf(ExpTable.getExpToAdvance(oldLevel + 1));
for (int i = oldLevel + 2; i <= newLevel; i++) {
range += "," + ExpTable.getExpToAdvance(i);
}
updateLevelResponse.setRange(range);
addResponseForUser(player.getID(), updateLevelResponse);
updateCash(player, amount);