QtCraft API C++ classes QML types Handbook

QcTameState Struct

What a tame creature is (QcMobDefinition::tameable, decision E-480): whose it is, whether it sits and the colour of its collar, saved with it (component Tame of QcEntityCodec); and whom it attacks for its owner now, which is not saved. More...

Header: #include <server/mobbrains/QcTameState.h>

Public Variables

quint32 collar
QString owner
bool sitting
quint32 target
quint64 targetTick
double targetTimer

Detailed Description

Member Variable Documentation

quint32 QcTameState::collar

The RGB colour of its collar (kinds with a collar, QcTameDefinition::hasCollar).

QString QcTameState::owner

The identity of its owner (QcPetOwners::keyOf): the fingerprint of a player's proven identity, or "name:" and the case-folded name of a player without one (the local player). Never an entity id; the owner may be offline.

bool QcTameState::sitting

Sits where it is: it neither follows nor teleports nor fights.

quint64 QcTameState::targetTick

The server tick of the owner's fight that set the target (PlayerView::hurtTick or struckTick): only a newer fight sets another; not saved.