@Override
    public void deserialize(Buffer buf) {
        id = buf.readShort();
        if (id < 0)
            throw new RuntimeException("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0");
        int limit = buf.readUShort();
        finishedObjective = new AchievementObjective[limit];
        for (int i = 0; i < limit; i++) {
            finishedObjective[i] = new AchievementObjective();
            finishedObjective[i].deserialize(buf);
        }
        limit = buf.readUShort();
        startedObjectives = new AchievementStartedObjective[limit];
        for (int i = 0; i < limit; i++) {
            startedObjectives[i] = new AchievementStartedObjective();
            startedObjectives[i].deserialize(buf);
        }
    }