Planeshift
Public Member Functions | Protected Attributes

psQuestPrereqOpQuestCompletedCategory Class Reference

Quest Completed Category operator. More...

#include <psquestprereqops.h>

List of all members.

Public Member Functions

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

Protected Attributes

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

Detailed Description

Quest Completed Category operator.

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

Definition at line 512 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 541 of file psquestprereqops.h.

virtual psQuestPrereqOpQuestCompletedCategory::~psQuestPrereqOpQuestCompletedCategory ( ) [inline, virtual]

Destructor for the quest completed category prerequisite operator.

Definition at line 548 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

The category that will be tested for.

Definition at line 529 of file psquestprereqops.h.

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

Definition at line 524 of file psquestprereqops.h.

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

Definition at line 519 of file psquestprereqops.h.


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