Planeshift
ApplicativeScript Class Reference

ApplicativeScript is the applied script container. More...

#include <scripting.h>

Public Member Functions

ActiveSpellApply (MathEnvironment *env, bool registerCancelEvent=true)
 execute the script Executes the script in the context of the supplied MathEnvironment. More...
 
const csString & GetDescription (MathEnvironment *env)
 
void SetImage (csString tImage)
 
 ~ApplicativeScript ()
 default destructore More...
 

Static Public Member Functions

static ApplicativeScriptCreate (EntityManager *entitymanager, CacheManager *cachemanager, const char *script)
 create a ApplicativeScript from a string containing a xml script More...
 
static ApplicativeScriptCreate (EntityManager *entitymanager, CacheManager *cachemanager, iDocumentNode *top)
 create a progressionscript from a xml script More...
 
static ApplicativeScriptCreate (EntityManager *entitymanager, CacheManager *cachemanager, iDocumentNode *top, SPELL_TYPE type, const char *name, const char *duration)
 create a progressionscript from a xml script More...
 

Protected Member Functions

 ApplicativeScript ()
 internally used constructor More...
 

Protected Attributes

csString aim
 name of the MathScript var to aim at More...
 
csString description
 textual representation of the effect More...
 
MathExpressionduration
 an embedded MathExpression More...
 
csString image
 graphical representation of the effect More...
 
csString name
 the name of the spell More...
 
csPDelArray< AppliedOp > ops
 all the sub-operations More...
 
SPELL_TYPE type
 spell type...buff, debuff, etc. More...
 

Detailed Description

ApplicativeScript is the applied script container.

An applied script is a reversible script which is applied and after some time the applied effect is removed. Therefore the operations of the script are computed and then stored in an ActiveSpell object. So every operation within the ApplicativeScript must be reversible.

Definition at line 143 of file scripting.h.

Constructor & Destructor Documentation

ApplicativeScript::~ApplicativeScript ( )

default destructore

ApplicativeScript::ApplicativeScript ( )
protected

internally used constructor

Member Function Documentation

ActiveSpell* ApplicativeScript::Apply ( MathEnvironment env,
bool  registerCancelEvent = true 
)

execute the script Executes the script in the context of the supplied MathEnvironment.

A cancel event can be registered as well.

Parameters
envis a MathEnvironment containing variables and objects necessary for the script to run
registerCancelEventif true a cancel event is registered, otherwise not
static ApplicativeScript* ApplicativeScript::Create ( EntityManager entitymanager,
CacheManager cachemanager,
const char *  script 
)
static

create a ApplicativeScript from a string containing a xml script

Basically this function creates a xml script from the given string and then passes it on to the other Create function.

Parameters
entitymanagerof the psserver
cachemanagerof the psserver
scriptconst char* string containing the script to parse and store
static ApplicativeScript* ApplicativeScript::Create ( EntityManager entitymanager,
CacheManager cachemanager,
iDocumentNode *  top 
)
static

create a progressionscript from a xml script

Parses the supplied xml script and creates and stores an object representation of the script.

Parameters
entitymanagerof the psserver
cachemanagerof the psserver
topxml iDocumentNode containing the script to parse and store
static ApplicativeScript* ApplicativeScript::Create ( EntityManager entitymanager,
CacheManager cachemanager,
iDocumentNode *  top,
SPELL_TYPE  type,
const char *  name,
const char *  duration 
)
static

create a progressionscript from a xml script

Parses the supplied xml script and creates and stores an object representation of the script.

Parameters
entitymanagerof the psserver
cachemanagerof the psserver
topxml iDocumentNode containing the script to parse and store
typeof the spell (currently only buff or debuff)
nameof the spell that is created
durationof the spell, may be a formula
const csString& ApplicativeScript::GetDescription ( MathEnvironment env)
void ApplicativeScript::SetImage ( csString  tImage)
inline

Definition at line 195 of file scripting.h.

Member Data Documentation

csString ApplicativeScript::aim
protected

name of the MathScript var to aim at

Definition at line 204 of file scripting.h.

csString ApplicativeScript::description
protected

textual representation of the effect

Definition at line 206 of file scripting.h.

MathExpression* ApplicativeScript::duration
protected

an embedded MathExpression

Definition at line 208 of file scripting.h.

csString ApplicativeScript::image
protected

graphical representation of the effect

Definition at line 207 of file scripting.h.

csString ApplicativeScript::name
protected

the name of the spell

Definition at line 205 of file scripting.h.

csPDelArray<AppliedOp> ApplicativeScript::ops
protected

all the sub-operations

Definition at line 209 of file scripting.h.

SPELL_TYPE ApplicativeScript::type
protected

spell type...buff, debuff, etc.

Definition at line 203 of file scripting.h.


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