Planeshift
psQuestPrereqOpSkill Class Reference

Skill prerequisite operator. More...

#include <psquestprereqops.h>

Public Member Functions

virtual bool Check (psCharacter *character)
 Check if the skill is in the range. More...
 
virtual csPtr< psQuestPrereqOpCopy ()
 Copy the prerequisite operator. More...
 
virtual csString GetScriptOp ()
 Convert the prerequisite operator to a xml string. More...
 
 psQuestPrereqOpSkill (psSkillInfo *skill, unsigned int min, unsigned int max, bool allowBuffed)
 Construct a skill operator. More...
 
virtual ~psQuestPrereqOpSkill ()
 Destructor. More...
 
- Public Member Functions inherited from psQuestPrereqOp
virtual csString GetScript ()
 Convert the prerequisite script to a xml string. More...
 
virtual ~psQuestPrereqOp ()
 Destructor for the prerequisite operator. More...
 

Protected Attributes

bool allowBuffed
 Stores if we should allow buff to be taken in consideration. More...
 
int max
 The maximum skill level. More...
 
int min
 The minimum skill level. More...
 
psSkillInfoskill
 The skill name that is to be checked. More...
 

Detailed Description

Skill prerequisite operator.

The given skill level is required to be between min and max for this operator to be true.

Definition at line 1353 of file psquestprereqops.h.

Constructor & Destructor Documentation

psQuestPrereqOpSkill::psQuestPrereqOpSkill ( psSkillInfo skill,
unsigned int  min,
unsigned int  max,
bool  allowBuffed 
)
inline

Construct a skill operator.

Parameters
skillThe skill which should be checked for.
minThe minimum acceptable for this prerequisite to be true.
maxThe maximum acceptable for this prerequisite to be true.
allowBuffedDeclares if buff should be taken in consideration.

Definition at line 1374 of file psquestprereqops.h.

virtual psQuestPrereqOpSkill::~psQuestPrereqOpSkill ( )
inlinevirtual

Destructor.

Definition at line 1379 of file psquestprereqops.h.

Member Function Documentation

virtual bool psQuestPrereqOpSkill::Check ( psCharacter character)
virtual

Check if the skill is in the range.

Parameters
characterThe character that are checking for a prerequisite
Returns
True if min <= skill <= max.

Implements psQuestPrereqOp.

virtual csPtr<psQuestPrereqOp> psQuestPrereqOpSkill::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 psQuestPrereqOpSkill::GetScriptOp ( )
virtual

Convert the prerequisite operator to a xml string.

Convert the operator into the xml string: <skill name="skill name" min="0" max="0" allowbuffed="false" />

Returns
XML string for the prerequisite operator.

Implements psQuestPrereqOp.

Member Data Documentation

bool psQuestPrereqOpSkill::allowBuffed
protected

Stores if we should allow buff to be taken in consideration.

Definition at line 1363 of file psquestprereqops.h.

int psQuestPrereqOpSkill::max
protected

The maximum skill level.

Definition at line 1362 of file psquestprereqops.h.

int psQuestPrereqOpSkill::min
protected

The minimum skill level.

Definition at line 1361 of file psquestprereqops.h.

psSkillInfo* psQuestPrereqOpSkill::skill
protected

The skill name that is to be checked.

Definition at line 1359 of file psquestprereqops.h.


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