Planeshift
Public Member Functions | Protected Attributes

SetVariableResponseOp Class Reference

This script operation is used to set character variables from npc dialogs. More...

#include <dictionary.h>

List of all members.

Public Member Functions

virtual csString GetResponseScript ()
 Gets the script representation of this object (after it has been loaded).
virtual bool Load (iDocumentNode *node)
 Loads the script for the operation.
virtual bool Run (gemNPC *who, gemActor *target, NpcResponse *owner, csTicks &timeDelay, int &voiceNumber)
 Actually runs the precompiled script.
 SetVariableResponseOp ()
 Constructor. Practically does nothing.
virtual ~SetVariableResponseOp ()
 Destructor.

Protected Attributes

csString variableName
 The name of the variable to be set.
csString variableValue
 The value of the variable to be set.

Detailed Description

This script operation is used to set character variables from npc dialogs.

It can set a name and a value to associated to it. Note that each name must be unique for the current character or it will be overwritten.

Definition at line 602 of file dictionary.h.


Constructor & Destructor Documentation

SetVariableResponseOp::SetVariableResponseOp ( ) [inline]

Constructor. Practically does nothing.

Definition at line 610 of file dictionary.h.

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

Destructor.

Definition at line 616 of file dictionary.h.


Member Function Documentation

virtual csString SetVariableResponseOp::GetResponseScript ( ) [virtual]

Gets the script representation of this object (after it has been loaded).

Returns:
A string with the content of the currently loaded script.

Implements ResponseOperation.

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

Loads the script for the operation.

Parameters:
nodeThe document node of this operator.

Implements ResponseOperation.

virtual bool SetVariableResponseOp::Run ( gemNPC who,
gemActor target,
NpcResponse owner,
csTicks &  timeDelay,
int voiceNumber 
) [virtual]

Actually runs the precompiled script.

Parameters:
whoThe npc action which is running the script (ignored).
targetThe npc actor which is being subject of the script.
ownerThe npc response containing this script operation (ignored).
timeDelayThe time to wait before applying this script operation (ignored).
voiceNumberThe voice to apply for this operation (ignored).
Returns:
The function always returns true.

Implements ResponseOperation.


Member Data Documentation

The name of the variable to be set.

Definition at line 605 of file dictionary.h.

The value of the variable to be set.

Definition at line 606 of file dictionary.h.


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