Planeshift
Public Member Functions | Protected Attributes

psQuestPrereqOpItem Class Reference

Inventory prerequisite operator. More...

#include <psquestprereqops.h>

List of all members.

Public Member Functions

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

Protected Attributes

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

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 653 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 678 of file psquestprereqops.h.

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

Destructor.

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

minimum amount of this sort of item

Definition at line 660 of file psquestprereqops.h.

whether equiped or inventory is included in searches

Definition at line 659 of file psquestprereqops.h.

csString psQuestPrereqOpItem::categoryName [protected]

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

Definition at line 657 of file psquestprereqops.h.

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

Definition at line 658 of file psquestprereqops.h.

csString psQuestPrereqOpItem::itemName [protected]

Definition at line 656 of file psquestprereqops.h.

minimum quality of the required item

Definition at line 662 of file psquestprereqops.h.

maximum amount of this sort of item

Definition at line 661 of file psquestprereqops.h.


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