@Override
    public void deserialize(Buffer buf) {
        setId = buf.readShort();
        if (setId < 0)
            throw new RuntimeException("Forbidden value on setId = " + setId + ", it doesn't respect the following condition : setId < 0");
        int limit = buf.readUShort();
        setObjects = new short[limit];
        for (int i = 0; i < limit; i++) {
            setObjects[i] = buf.readShort();
        }
        limit = buf.readUShort();
        setEffects = new ObjectEffect[limit];
        for (int i = 0; i < limit; i++) {
            setEffects[i] = ProtocolTypeManager.getInstance().build(buf.readShort());
            setEffects[i].deserialize(buf);
        }
    }