Planeshift
Public Member Functions | Protected Attributes

psQuestPrereqOpQuestCompleted Class Reference

Quest Completed prerequisite operator. More...

#include <psquestprereqops.h>

List of all members.

Public Member Functions

virtual bool Check (psCharacter *character)
 Check if the given quest is completed.
virtual csPtr< psQuestPrereqOpCopy ()
 Copy the prerequisite operator.
virtual psQuestGetQuest ()
 retrieve the quest.
virtual csString GetQuestName ()
 retrieve the quest name.
virtual csString GetScriptOp ()
 Convert the prerequisite operator to a xml string.
 psQuestPrereqOpQuestCompleted (psQuest *quest)
 Construct a quest completed operator.
 psQuestPrereqOpQuestCompleted (csString questName)
 Construct a quest completed operator.
virtual ~psQuestPrereqOpQuestCompleted ()
 Destructor for the quest completed prerequisite operator.

Protected Attributes

csString name
csWeakRef< psQuestquest
 The quest that need to be completed.

Detailed Description

Quest Completed prerequisite operator.

The given quest have to be completed for this prerequisite to be true.

Definition at line 356 of file psquestprereqops.h.


Constructor & Destructor Documentation

psQuestPrereqOpQuestCompleted::psQuestPrereqOpQuestCompleted ( psQuest quest) [inline]

Construct a quest completed operator.

Parameters:
questThe quest that need to be completed

Definition at line 372 of file psquestprereqops.h.

psQuestPrereqOpQuestCompleted::psQuestPrereqOpQuestCompleted ( csString  questName)

Construct a quest completed operator.

Parameters:
questNameThe quest that need to be completed
virtual psQuestPrereqOpQuestCompleted::~psQuestPrereqOpQuestCompleted ( ) [inline, virtual]

Destructor for the quest completed prerequisite operator.

Definition at line 384 of file psquestprereqops.h.


Member Function Documentation

virtual bool psQuestPrereqOpQuestCompleted::Check ( psCharacter character) [virtual]

Check if the given quest is completed.

prerequisite = Is the quest completed.

Parameters:
characterThe character that are checking for a prerequisite
Returns:
True if the charachter have completed the given quest.

Implements psQuestPrereqOp.

virtual csPtr<psQuestPrereqOp> psQuestPrereqOpQuestCompleted::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 psQuest* psQuestPrereqOpQuestCompleted::GetQuest ( ) [virtual]

retrieve the quest.

check the weak pointer reference, and if it's invalid try to retrieve the quest again.

virtual csString psQuestPrereqOpQuestCompleted::GetQuestName ( ) [virtual]

retrieve the quest name.

check weak pointer reference and try to optain a new ref, if it's invalid. Otherwise name is used

virtual csString psQuestPrereqOpQuestCompleted::GetScriptOp ( ) [virtual]

Convert the prerequisite operator to a xml string.

Convert the operator into the xml string: <completed quest="quest name"/>

Returns:
XML string for the prerequisite operator.

Implements psQuestPrereqOp.


Member Data Documentation

Definition at line 363 of file psquestprereqops.h.

The quest that need to be completed.

Definition at line 362 of file psquestprereqops.h.


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