QtCraft API C++ classes QML types Handbook

QcMsg::MoveInventoryItem Struct

struct QcMsg::MoveInventoryItem

Client -> server: move count items from slot from to slot to. More...

Header: #include <common/protocol/QcPlayerMessages.h>

Public Variables

qint32 count
qint32 from
qint32 to

Static Public Members

const qint32 craftingGridSlot
const qint32 equipmentSlot
bool isEquipmentSlot(qint32 slot)
const qint32 machineFuelSlot
const qint32 machineInputSlot
const qint32 machineOutputSlot

Detailed Description

Slots 0..35 are the inventory, 36..44 the crafting grid (row-major, 3 per row; a 2 x 2 grid uses the top-left four), 45..47 the open machine (input, fuel, output; the output only gives), or 45 onwards the slots of the open storage block, or 45 and 47 the open stonecutter (input and output, decision E-785), and 100..103 the armour slots (head, chest, legs, feet; only armour made for the slot goes in, decision E-234).

count 0 moves the whole stack.

Member Function Documentation

[static constexpr] bool MoveInventoryItem::isEquipmentSlot(qint32 slot)

Returns whether slot is one of the four armour slots.

Member Variable Documentation

qint32 MoveInventoryItem::count

How many; 0 moves the whole stack.

const qint32 MoveInventoryItem::craftingGridSlot

The first slot of the crafting grid.

const qint32 MoveInventoryItem::equipmentSlot

The first armour slot (head).

qint32 MoveInventoryItem::from

The slot the items come from.

qint32 MoveInventoryItem::to

The slot they go to.