QtCraft API C++ classes QML types Handbook

QcGolemState Struct

What a golem (QcMobDefinition::Ai::Golem, decision E-471) keeps between ticks: whether a player built it (saved with the creature), the hostile creature it is after and the player it is angry with (not saved: a loaded golem looks again). More...

Header: #include <server/golems/QcGolemState.h>

Public Variables

quint32 angryAt
double angryUntil
bool playerBuilt
quint32 prey

Detailed Description

A component of the creature (QcCreature::golem).

Member Variable Documentation

quint32 QcGolemState::angryAt

The player that hurt it (entity id).

double QcGolemState::angryUntil

The world time its anger ends (QcGolemGrudges).

bool QcGolemState::playerBuilt

Built by a player from blocks (QcGolemBuilding): it never attacks players.

quint32 QcGolemState::prey

The creature it chases (entity id), 0 for none.