QtCraft API C++ classes QML types Handbook

QcLootTableDefinition Struct

A loot table (loot/<name>.json, decision E-521): what a chest the world generator places holds (dungeons; later mine shafts and surface structures). More...

Header: #include <common/content/recipes/QcLootTableDefinition.h>

Public Types

struct Entry
struct Pool

Public Variables

QString name
QList<QcLootTableDefinition::Pool> pools

Static Public Members

const int maxEntries
const int maxPools
const int maxRolls
const int maxWeight

Detailed Description

Each pool draws a number of times between minRolls and maxRolls, each draw one entry by weight; an entry without an item stands for nothing. Server side only.

Member Variable Documentation

const int QcLootTableDefinition::maxEntries

Most entries of a pool.

const int QcLootTableDefinition::maxPools

Most pools of a table.

const int QcLootTableDefinition::maxRolls

Upper limit of a pool's rolls.

const int QcLootTableDefinition::maxWeight

Upper limit of an entry's weight.

QString QcLootTableDefinition::name

Qualified name ("name", required).

QList<QcLootTableDefinition::Pool> QcLootTableDefinition::pools

The pools, each drawn in turn ("pools", 1 to maxPools).