@classmethod
def from_packet(cls, packet):
    """Read an item from a packet.
		:param packet: :class:`aiotfm.Packet` the packet.
		:return: :class:`aiotfm.inventory.InventoryItem` the item.
		"""
    item_id = packet.read16()
    kwargs = {'quantity': packet.read8(), 'category': packet.read8(),
        'is_event': packet.readBool(), 'can_use': packet.readBool()}
    packet.readBool()
    packet.readBool()
    packet.readBool()
    packet.readBool()
    if packet.readBool():
        kwargs['img_id'] = packet.readUTF()
    kwargs['slot'] = packet.read8()
    return cls(item_id, **kwargs)
