Planeshift
|
Work will make the NPC work for a resource. More...
#include <npcoperations.h>
Public Member Functions | |
virtual bool | Load (iDocumentNode *node) |
virtual ScriptOperation * | MakeCopy () |
virtual OperationResult | Run (NPC *npc, bool interrupted) |
WorkOperation () | |
virtual | ~WorkOperation () |
Protected Attributes | |
csString | resource |
The name of the resource to work for. | |
csString | type |
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.
WorkOperation::WorkOperation | ( | ) | [inline] |
Definition at line 806 of file npcoperations.h.
virtual WorkOperation::~WorkOperation | ( | ) | [inline, virtual] |
Definition at line 807 of file npcoperations.h.
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.
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.