QtCraft API C++ classes QML types Handbook

QcPlayerRecords Namespace

What is saved of a player and how it comes back (decision E-367): the state of a connected player as a QcPlayerData for QcPlayerStorage, and a saved one put onto a player who joins again. More...

Header: #include <server/storage/QcPlayerRecords.h>

Classes

struct Record

Functions

QcPlayerRecords::Record of(const QcServerClient &client, const QcContentRegistry &content)
void restore(QcServerClient &client, const QcPlayerData &player)

Detailed Description

Classes

class Record

A player's saved state and the number of items of an open crafting grid that did not fit into its inventory. More...

Function Documentation

QcPlayerRecords::Record QcPlayerRecords::of(const QcServerClient &client, const QcContentRegistry &content)

Returns the saved state of client, items named after content. Items in an open crafting grid go into the inventory, as if the grid had been closed.

void QcPlayerRecords::restore(QcServerClient &client, const QcPlayerData &player)

Puts the saved state player onto client, who joins again, with the rules of the saved game mode applied.