QtCraft API C++ classes QML types Handbook

QcMobExchange::PlayerHit Struct

struct QcMobExchange::PlayerHit

A blow of a creature at a player; the server deals it after the tick. More...

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

Public Variables

double damage
QcVec3 knockback
double lift
quint32 mob
std::optional<QcCreatureKindId> mobType
quint32 playerEntityId

Detailed Description

Member Variable Documentation

double PlayerHit::damage

The damage before armour.

QcVec3 PlayerHit::knockback

The push the player gets (m/s).

double PlayerHit::lift

Times a blow's usual lift (a golem's throws upwards, decision E-471).

quint32 PlayerHit::mob

Entity id of the creature that struck (0: unknown); the player's pets turn on it (decision E-480).

std::optional<QcCreatureKindId> PlayerHit::mobType

The kind of the creature that struck; its blow effects go with the hit (decision E-450).

quint32 PlayerHit::playerEntityId

Entity id of the player hit.