Planeshift
Public Member Functions | Protected Attributes

RewardOperation Class Reference

Implement the reward NPC script operation. More...

#include <npcoperations.h>

List of all members.

Public Member Functions

virtual bool Load (iDocumentNode *node)
virtual ScriptOperationMakeCopy ()
 RewardOperation ()
virtual OperationResult Run (NPC *npc, bool interrupted)
virtual ~RewardOperation ()

Protected Attributes

int count
 The number of the resource to reward to the tribe.
csString resource
 The Resource to be rewarded to the tribe.

Detailed Description

Implement the reward NPC script operation.

Reward will add a given resource to the Tribe that the current NPC is a member of.

Examples:

 <reward resource="Gold Ore" count="2" />
 <reward resource="tribe:wealth" /> 

Definition at line 1344 of file npcoperations.h.


Constructor & Destructor Documentation

RewardOperation::RewardOperation ( ) [inline]

Definition at line 1352 of file npcoperations.h.

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

Definition at line 1353 of file npcoperations.h.


Member Function Documentation

virtual bool RewardOperation::Load ( iDocumentNode *  node) [virtual]

Reimplemented from ScriptOperation.

virtual ScriptOperation* RewardOperation::MakeCopy ( ) [virtual]

Implements ScriptOperation.

virtual OperationResult RewardOperation::Run ( NPC npc,
bool  interrupted 
) [virtual]

Implements ScriptOperation.


Member Data Documentation

The number of the resource to reward to the tribe.

Definition at line 1348 of file npcoperations.h.

csString RewardOperation::resource [protected]

The Resource to be rewarded to the tribe.

Definition at line 1347 of file npcoperations.h.


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