Planeshift
Public Member Functions | Protected Attributes

WorkOperation Class Reference

Work will make the NPC work for a resource. More...

#include <npcoperations.h>

List of all members.

Public Member Functions

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

Protected Attributes

csString resource
 The name of the resource to work for.
csString type

Detailed Description

Work will make the NPC work for a resource.

This class is the implementation of the work operations used in behavior scripts for NPCS.

Examples:

  <work type="dig" resource="tribe:wealth" />
  <work type="dig" resource="Gold Ore" /> 

Definition at line 798 of file npcoperations.h.


Constructor & Destructor Documentation

WorkOperation::WorkOperation ( ) [inline]

Definition at line 806 of file npcoperations.h.

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

Definition at line 807 of file npcoperations.h.


Member Function Documentation

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

Reimplemented from ScriptOperation.

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

Implements ScriptOperation.

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

Implements ScriptOperation.


Member Data Documentation

csString WorkOperation::resource [protected]

The name of the resource to work for.

Definition at line 802 of file npcoperations.h.

csString WorkOperation::type [protected]

Definition at line 801 of file npcoperations.h.


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