Planeshift
psQuestPrereqOpFaction Class Reference

Faction prerequisite operator. More...

#include <psquestprereqops.h>

Public Member Functions

virtual bool Check (psCharacter *character)
 Check if the faction is above level. More...
 
virtual csPtr< psQuestPrereqOpCopy ()
 Copy the prerequisite operator. More...
 
virtual csString GetScriptOp ()
 Convert the prerequisite operator to a xml string. More...
 
 psQuestPrereqOpFaction (Faction *faction, int value, bool max)
 Construct a faction operator. More...
 
virtual ~psQuestPrereqOpFaction ()
 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

Factionfaction
 The faction that is to be checked. More...
 
bool max
 
int value
 The faction level needed. More...
 

Detailed Description

Faction prerequisite operator.

The given faction level is needed for this prerequisite to be true.

Definition at line 590 of file psquestprereqops.h.

Constructor & Destructor Documentation

psQuestPrereqOpFaction::psQuestPrereqOpFaction ( Faction faction,
int  value,
bool  max 
)
inline

Construct a faction operator.

Parameters
factionThe quest that need to be assigned.
valueThe value
maxIs the level a max.

Definition at line 612 of file psquestprereqops.h.

virtual psQuestPrereqOpFaction::~psQuestPrereqOpFaction ( )
inlinevirtual

Destructor.

Definition at line 617 of file psquestprereqops.h.

Member Function Documentation

virtual bool psQuestPrereqOpFaction::Check ( psCharacter character)
virtual

Check if the faction is above level.

prerequisite = Is the faction positive.

Parameters
characterThe character that are checking for a prerequisite
Returns
True if the faction is positive.

Implements psQuestPrereqOp.

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

Convert the prerequisite operator to a xml string.

Convert the operator into the xml string: <faction name="faction name" value="faction value"/>

Returns
XML string for the prerequisite operator.

Implements psQuestPrereqOp.

Member Data Documentation

Faction* psQuestPrereqOpFaction::faction
protected

The faction that is to be checked.

Definition at line 596 of file psquestprereqops.h.

bool psQuestPrereqOpFaction::max
protected

Definition at line 602 of file psquestprereqops.h.

int psQuestPrereqOpFaction::value
protected

The faction level needed.

Definition at line 601 of file psquestprereqops.h.


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