QtCraft API C++ classes QML types Handbook

QcMobDrinking Class

Creatures that drink to heal (QcMobDefinition::drinks, decision E-623; the witch), every game tick after the creatures thought: an archer whose health lies heal or more below its most begins to drink when its last drink is cooldownSeconds past; it holds the drink's item (QcEntitySync) and neither draws nor shoots (QcArcherBrain) for seconds, then heals by heal (up to its most) with the drink's sound. More...

Header: #include <server/mobs/QcMobDrinking.h>

Public Functions

int drinks() const
void tick()

Detailed Description

Hurting it does not break the drink. Nothing of it is saved: a loaded witch begins again.

Member Function Documentation

int QcMobDrinking::drinks() const

Returns the drinks finished since the start (tests, measurements).

void QcMobDrinking::tick()

Begins and finishes the drinks of this game tick.