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. | |
const csString & | GetDescription (MathEnvironment *env) |
void | SetImage (csString tImage) |
~ApplicativeScript () | |
default destructore | |
Static Public Member Functions | |
static ApplicativeScript * | Create (EntityManager *entitymanager, CacheManager *cachemanager, const char *script) |
create a ApplicativeScript from a string containing a xml script | |
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 | |
static ApplicativeScript * | Create (EntityManager *entitymanager, CacheManager *cachemanager, iDocumentNode *top) |
create a progressionscript from a xml script | |
Protected Member Functions | |
ApplicativeScript () | |
internally used constructor | |
Protected Attributes | |
csString | aim |
name of the MathScript var to aim at | |
csString | description |
textual representation of the effect | |
MathExpression * | duration |
an embedded MathExpression | |
csString | image |
graphical representation of the effect | |
csString | name |
the name of the spell | |
csPDelArray< AppliedOp > | ops |
all the sub-operations | |
SPELL_TYPE | type |
spell type...buff, debuff, etc. |
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
ApplicativeScript::ApplicativeScript | ( | ) | [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 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.
entitymanager | of the psserver |
cachemanager | of the psserver |
script | const 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.
entitymanager | of the psserver |
cachemanager | of the psserver |
top | xml 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.
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 | ) |
void ApplicativeScript::SetImage | ( | csString | tImage | ) | [inline] |
Definition at line 195 of file scripting.h.
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.