Planeshift
psQuestPrereqOpItem Class Reference

Inventory prerequisite operator. More...

#include <psquestprereqops.h>

Public Member Functions

virtual bool Check (psCharacter *character)
 Check if the specified item is in the player inventory/equipment. More...
 
virtual csPtr< psQuestPrereqOpCopy ()
 Copy the prerequisite operator. More...
 
virtual csString GetScriptOp ()
 Convert the prerequisite operator to a xml string. More...
 
 psQuestPrereqOpItem (const char *itemName, const char *categoryName, bool includeInventory, int amountMin, int amountMax, float qualityMin, float qualityMax)
 maximum quality of the required item More...
 
virtual ~psQuestPrereqOpItem ()
 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

int amountMax
 minimum amount of this sort of item More...
 
int amountMin
 whether equiped or inventory is included in searches More...
 
csString categoryName
 itemname of the item (if empty, category must be set) More...
 
bool includeInventory
 category of the item (if empty, itemname must be set) More...
 
csString itemName
 
float qualityMax
 minimum quality of the required item More...
 
float qualityMin
 maximum amount of this sort of item More...
 

Detailed Description

Inventory prerequisite operator.

The given item must be equiped or just in inventory (includes the first) for this prerequisite to be true.

Definition at line 656 of file psquestprereqops.h.

Constructor & Destructor Documentation

psQuestPrereqOpItem::psQuestPrereqOpItem ( const char *  itemName,
const char *  categoryName,
bool  includeInventory,
int  amountMin,
int  amountMax,
float  qualityMin,
float  qualityMax 
)
inline

maximum quality of the required item

Construct an inventory operator.

Parameters
itemNameThe name of the base item we are searching for.
categoryNameThe name of the category.
includeInventoryif true it will search either equipment and inventory else only inventory.
amountMinA minimum amount.
amountMaxA maximum amount.
qualityMinA minimum quality.
qualityMaxA maximum quality

Definition at line 681 of file psquestprereqops.h.

virtual psQuestPrereqOpItem::~psQuestPrereqOpItem ( )
inlinevirtual

Destructor.

Definition at line 688 of file psquestprereqops.h.

Member Function Documentation

virtual bool psQuestPrereqOpItem::Check ( psCharacter character)
virtual

Check if the specified item is in the player inventory/equipment.

Parameters
characterThe character that are checking for a prerequisite
Returns
True if the item was found.

Implements psQuestPrereqOp.

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

Convert the prerequisite operator to a xml string.

Convert the operator into the xml string: <item inventory="true/false" name="baseitemname"/>

Returns
XML string for the prerequisite operator.

Implements psQuestPrereqOp.

Member Data Documentation

int psQuestPrereqOpItem::amountMax
protected

minimum amount of this sort of item

Definition at line 663 of file psquestprereqops.h.

int psQuestPrereqOpItem::amountMin
protected

whether equiped or inventory is included in searches

Definition at line 662 of file psquestprereqops.h.

csString psQuestPrereqOpItem::categoryName
protected

itemname of the item (if empty, category must be set)

Definition at line 660 of file psquestprereqops.h.

bool psQuestPrereqOpItem::includeInventory
protected

category of the item (if empty, itemname must be set)

Definition at line 661 of file psquestprereqops.h.

csString psQuestPrereqOpItem::itemName
protected

Definition at line 659 of file psquestprereqops.h.

float psQuestPrereqOpItem::qualityMax
protected

minimum quality of the required item

Definition at line 665 of file psquestprereqops.h.

float psQuestPrereqOpItem::qualityMin
protected

maximum amount of this sort of item

Definition at line 664 of file psquestprereqops.h.


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