@Override
    public void deserialize(Buffer buf) {
        int limit = buf.readUShort();
        quantities = new int[limit];
        for (int i = 0; i < limit; i++) {
            quantities[i] = buf.readInt();
        }
        limit = buf.readUShort();
        types = new int[limit];
        for (int i = 0; i < limit; i++) {
            types[i] = buf.readInt();
        }
        taxPercentage = buf.readFloat();
        maxItemLevel = buf.readInt();
        if (maxItemLevel < 0)
            throw new RuntimeException("Forbidden value on maxItemLevel = " + maxItemLevel + ", it doesn't respect the following condition : maxItemLevel < 0");
        maxItemPerAccount = buf.readInt();
        if (maxItemPerAccount < 0)
            throw new RuntimeException("Forbidden value on maxItemPerAccount = " + maxItemPerAccount + ", it doesn't respect the following condition : maxItemPerAccount < 0");
        npcContextualId = buf.readInt();
        unsoldDelay = buf.readShort();
        if (unsoldDelay < 0)
            throw new RuntimeException("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0");
    }