QtCraft API C++ classes QML types Handbook

QcClientAdvancements Class

The local player's progress in the adventure guide as the server told it (decision E-923, QcMsg::AdvancementProgress); the definitions come with the content (QcContentRegistry::advancements). More...

Header: #include <clientcore/player/QcClientAdvancements.h>

Public Functions

QStringList apply(const QcMsg::AdvancementProgress &message, const QcContentRegistry *content)
qsizetype doneCount() const
bool isDone(const QString &advancement) const
const QcAdvancementProgress &progress() const

Detailed Description

Member Function Documentation

QStringList QcClientAdvancements::apply(const QcMsg::AdvancementProgress &message, const QcContentRegistry *content)

Takes over message. Returns the advancements the server announced (reached just now, for the toast), in the order of the message. Only advancements of content count as reached (none without it).

qsizetype QcClientAdvancements::doneCount() const

Returns the number of advancements reached.

bool QcClientAdvancements::isDone(const QString &advancement) const

Returns whether the player reached advancement.

const QcAdvancementProgress &QcClientAdvancements::progress() const

Returns the progress of every advancement as the server last told it.