Planeshift
|
Require prerequisite operator. More...
#include <psquestprereqops.h>
Public Member Functions | |
virtual bool | Check (psCharacter *character) |
Check if a number of prerequisites are true. | |
virtual csPtr< psQuestPrereqOp > | Copy () |
Copy the prerequisite operator. | |
virtual csString | GetScriptOp () |
Convert the prerequisite operator to a xml string. | |
psQuestPrereqOpRequire (int min_required, int max_required) | |
Construct a require operator. | |
virtual | ~psQuestPrereqOpRequire () |
Destructor for the require prerequisite operator. |
Require prerequisite operator.
A multi term require operator. The given minimum and/or maximum of childs have to be completed for this prerequisite to be true.
Definition at line 251 of file psquestprereqops.h.
Construct a require operator.
min_required | The minimum of childs needed. There is no lower limit if this is set to -1. |
max_required | The maximum of childs needed. There is no upper limit if this is set to -1. |
virtual psQuestPrereqOpRequire::~psQuestPrereqOpRequire | ( | ) | [inline, virtual] |
Destructor for the require prerequisite operator.
Definition at line 269 of file psquestprereqops.h.
virtual bool psQuestPrereqOpRequire::Check | ( | psCharacter * | character | ) | [virtual] |
Check if a number of prerequisites are true.
Limited by a min and a max number. If any of these are -1 the limit will be ignored.
number = number of childs true prerequisite = number >= min and number <= max
character | The character being checked for a prerequisite |
Implements psQuestPrereqOp.
virtual csPtr<psQuestPrereqOp> psQuestPrereqOpRequire::Copy | ( | ) | [virtual] |
Copy the prerequisite operator.
Override this function to return a copy of the prerequisite operator.
Implements psQuestPrereqOp.
virtual csString psQuestPrereqOpRequire::GetScriptOp | ( | ) | [virtual] |
Convert the prerequisite operator to a xml string.
Convert the operator into the xml string: <require [min="min"] [max="max"]><child1>...<childN></require>
Implements psQuestPrereqOp.