Planeshift
psQuestPrereqOpQuestCompletedCategory Class Reference

Quest Completed Category operator. More...

#include <psquestprereqops.h>

Public Member Functions

virtual bool Check (psCharacter *character)
 Check if the charater have completed a number quests with the given category. More...
 
virtual csPtr< psQuestPrereqOpCopy ()
 Copy the prerequisite operator. More...
 
virtual csString GetScriptOp ()
 Convert the prerequisite operator to a xml string. More...
 
 psQuestPrereqOpQuestCompletedCategory (csString quest_category, int min_required, int max_required)
 Construct a quest completed category opererator. More...
 
virtual ~psQuestPrereqOpQuestCompletedCategory ()
 Destructor for the quest completed category prerequisite operator. 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

csString category
 The category that will be tested for. More...
 
int max
 The maximum of quest in the given category that need to be completed. More...
 
int min
 The minimum of quest in the given category that need to be completed. More...
 

Detailed Description

Quest Completed Category operator.

Need to have completed a number of quests for a given category.

Definition at line 515 of file psquestprereqops.h.

Constructor & Destructor Documentation

psQuestPrereqOpQuestCompletedCategory::psQuestPrereqOpQuestCompletedCategory ( csString  quest_category,
int  min_required,
int  max_required 
)
inline

Construct a quest completed category opererator.

Parameters
quest_categoryThe category that the user is tested agains.
min_requiredThe minimum of quests needed. There are no lower limit if this is set to -1.
max_requiredThe maximum of quests needed. There are no upper limit if this is set to -1.

Definition at line 544 of file psquestprereqops.h.

virtual psQuestPrereqOpQuestCompletedCategory::~psQuestPrereqOpQuestCompletedCategory ( )
inlinevirtual

Destructor for the quest completed category prerequisite operator.

Definition at line 551 of file psquestprereqops.h.

Member Function Documentation

virtual bool psQuestPrereqOpQuestCompletedCategory::Check ( psCharacter character)
virtual

Check if the charater have completed a number quests with the given category.

number = number of quests completed in the given category. prerequisite = number >= min and number <= max

Parameters
characterThe character that are checking for a prerequisite
Returns
True if more than min and less than max quests of the given category is completed.

Implements psQuestPrereqOp.

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

Convert the prerequisite operator to a xml string.

Convert the operator into the xml string: <completed category="category" [min="min"] [max="max"] />

Returns
XML string for the prerequisite operator.

Implements psQuestPrereqOp.

Member Data Documentation

csString psQuestPrereqOpQuestCompletedCategory::category
protected

The category that will be tested for.

Definition at line 532 of file psquestprereqops.h.

int psQuestPrereqOpQuestCompletedCategory::max
protected

The maximum of quest in the given category that need to be completed.

Definition at line 527 of file psquestprereqops.h.

int psQuestPrereqOpQuestCompletedCategory::min
protected

The minimum of quest in the given category that need to be completed.

Definition at line 522 of file psquestprereqops.h.


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