Planeshift
Public Member Functions

psQuestPrereqOpRequire Class Reference

Require prerequisite operator. More...

#include <psquestprereqops.h>

List of all members.

Public Member Functions

virtual bool Check (psCharacter *character)
 Check if a number of prerequisites are true.
virtual csPtr< psQuestPrereqOpCopy ()
 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.

Detailed Description

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.


Constructor & Destructor Documentation

psQuestPrereqOpRequire::psQuestPrereqOpRequire ( int  min_required,
int  max_required 
)

Construct a require operator.

Parameters:
min_requiredThe minimum of childs needed. There is no lower limit if this is set to -1.
max_requiredThe 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.


Member Function Documentation

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

Parameters:
characterThe character being checked for a prerequisite
Returns:
True if more than min and less than max of the child prerequisites are true

Implements psQuestPrereqOp.

virtual csPtr<psQuestPrereqOp> psQuestPrereqOpRequire::Copy ( ) [virtual]

Copy the prerequisite operator.

Override this function to return a copy of the prerequisite operator.

Returns:
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>

Returns:
XML string for the prerequisite operator.

Implements psQuestPrereqOp.


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