Planeshift
|
ApplicativeScript is the applied script container. More...
#include <scripting.h>
Public Member Functions | |
ActiveSpell * | Apply (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 ApplicativeScript * | Create (EntityManager *entitymanager, CacheManager *cachemanager, const char *script) |
create a ApplicativeScript from a string containing a xml script More... | |
static ApplicativeScript * | Create (EntityManager *entitymanager, CacheManager *cachemanager, iDocumentNode *top) |
create a progressionscript from a xml script More... | |
static ApplicativeScript * | Create (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... | |
MathExpression * | duration |
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... | |
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.
ApplicativeScript::~ApplicativeScript | ( | ) |
default destructore
|
protected |
internally used constructor
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.
env | is a MathEnvironment containing variables and objects necessary for the script to run |
registerCancelEvent | if true a cancel event is registered, otherwise not |
|
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.
entitymanager | of the psserver |
cachemanager | of the psserver |
script | const char* string containing the script to parse and store |
|
static |
create a progressionscript from a xml script
Parses the supplied xml script and creates and stores an object representation of the script.
entitymanager | of the psserver |
cachemanager | of the psserver |
top | xml iDocumentNode containing the script to parse and store |
|
static |
create a progressionscript from a xml script
Parses the supplied xml script and creates and stores an object representation of the script.
entitymanager | of the psserver |
cachemanager | of the psserver |
top | xml iDocumentNode containing the script to parse and store |
type | of the spell (currently only buff or debuff) |
name | of the spell that is created |
duration | of the spell, may be a formula |
const csString& ApplicativeScript::GetDescription | ( | MathEnvironment * | env | ) |
|
inline |
Definition at line 195 of file scripting.h.
|
protected |
name of the MathScript var to aim at
Definition at line 204 of file scripting.h.
|
protected |
textual representation of the effect
Definition at line 206 of file scripting.h.
|
protected |
an embedded MathExpression
Definition at line 208 of file scripting.h.
|
protected |
graphical representation of the effect
Definition at line 207 of file scripting.h.
|
protected |
the name of the spell
Definition at line 205 of file scripting.h.
|
protected |
all the sub-operations
Definition at line 209 of file scripting.h.
|
protected |
spell type...buff, debuff, etc.
Definition at line 203 of file scripting.h.