CEL

Public API Reference

iLootSelector Struct Reference

A loot package selector. More...

#include <tools/loot.h>

Inheritance diagram for iLootSelector:

List of all members.

Public Member Functions

virtual void AddLootGenerator (iLootGenerator *generator, float chance, iParameter *validatePar=0)=0
 Add a loot selection rule.
virtual iLootGeneratorQueryLootGenerator ()=0
 Get the loot generator that this object represents.

Detailed Description

A loot package selector.

This selector is responsible for selecting the right loot package based on a number of criteria and rules. A loot selector is also a loot generator.

Definition at line 114 of file loot.h.


Member Function Documentation

virtual void iLootSelector::AddLootGenerator ( iLootGenerator generator,
float  chance,
iParameter validatePar = 0 
) [pure virtual]

Add a loot selection rule.

Loot selection rules are considered in order that they are added to this selector.

Parameters:
generator is the loot generator to select (can be a loot package or even another loot selector).
chance is a number between 0 and 1 indicating the chance with which this generator will be chosen.
validatePar is an optional validation parameter. After the 'chance' is evaluated this validation parameter can be used to finally decide if the generator should be considered. Usually an expression parameter is used for this. This expression can use the dynamic parameter to get the current entity containing the inventory that we're generating for.
virtual iLootGenerator* iLootSelector::QueryLootGenerator (  )  [pure virtual]

Get the loot generator that this object represents.


The documentation for this struct was generated from the following file:

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1