QtCraft API C++ classes QML types Handbook

QcMsg::TradeOffer Struct

struct QcMsg::TradeOffer

One offer as the trading screen shows it: what the player pays (one or two stacks, the first at its current price), what they get, and how often it can still be traded before the villager restocks. More...

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

Public Variables

QList<QcItemStack> costs
qint32 maxUses
QcItemStack result
qint32 uses

Static Public Members

const int maxCosts

Detailed Description

Member Variable Documentation

QList<QcItemStack> TradeOffer::costs

What the player pays (see the struct).

const int TradeOffer::maxCosts

The most stacks the player pays; the decoder refuses more.

QcItemStack TradeOffer::result

What the player gets.