version 1.19 | | version 1.20 |
---|
| | |
/* | | /* |
* static char *rcsid_plugins_c = | | * static char *rcsid_plugins_c = |
* "$Id: plugins.c,v 1.19 2003/06/11 17:38:32 gros Exp $"; | | * "$Id: plugins.c,v 1.20 2003/09/13 05:02:12 mwedel Exp $"; |
*/ | | */ |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
/* 0 - op; */ | | /* 0 - op; */ |
/* 1 - caster; */ | | /* 1 - caster; */ |
/* 2 - direction; */ | | /* 2 - direction; */ |
/* 3 - type of casting; */ | | /* 3 - spell object */ |
/* 4 - is it an ability or a wizard spell ? */ | | /* 4 - optional args; */ |
/* 5 - spelltype; */ | | |
/* 6 - optional args; */ | | |
/* 7 - type of firing; */ | | |
/* */ | | /* */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWCastSpell(CFParm* PParm) | | CFParm* CFWCastSpell(CFParm* PParm) |
| | |
static int val; | | static int val; |
CFParm *CFP; | | CFParm *CFP; |
CFP = (CFParm*)(malloc(sizeof(CFParm))); | | CFP = (CFParm*)(malloc(sizeof(CFParm))); |
/*int cast_spell(object *op, object *caster, int dir, int type, int ability, */ | | /* int cast_spell(object *op, object *caster,int dir,object *spell_ob, char *stringarg)*/ |
/*SpellTypeFrom item, char *stringarg); */ | | |
val = cast_spell((object *)(PParm->Value[0]),(object *)(PParm->Value[1]), | | val = cast_spell((object *)(PParm->Value[0]),(object *)(PParm->Value[1]), |
*(int *)(PParm->Value[2]),*(int *)(PParm->Value[3]), | | *(int*)(PParm->Value[2]), (object*)(PParm->Value[3]), |
*(int *)(PParm->Value[4]),*(SpellTypeFrom *)(PParm->Value[5]), | | (char *)(PParm->Value[4])); |
(char *)(PParm->Value[6])/*,*(int *) (PParm->Value[7])*/); | | |
CFP->Value[0] = (void *)(&val); | | CFP->Value[0] = (void *)(&val); |
return CFP; | | return CFP; |
}; | | }; |
| | |
{ | | { |
do_forget_spell( | | do_forget_spell( |
(object *)(PParm->Value[0]), | | (object *)(PParm->Value[0]), |
*(int *)(PParm->Value[1]) | | (char *)(PParm->Value[1]) |
); | | ); |
return NULL; | | return NULL; |
}; | | }; |
| | |
{ | | { |
do_learn_spell( | | do_learn_spell( |
(object *)(PParm->Value[0]), | | (object *)(PParm->Value[0]), |
*(int *)(PParm->Value[1]), | | (object *)(PParm->Value[1]), |
*(int *)(PParm->Value[2]) | | *(int *)(PParm->Value[2]) |
); | | ); |
return NULL; | | return NULL; |
| | |
CFParm* CFWCheckSpellKnown(CFParm* PParm) | | CFParm* CFWCheckSpellKnown(CFParm* PParm) |
{ | | { |
CFParm *CFP; | | CFParm *CFP; |
static int val; | | static object *val; |
| | |
CFP = (CFParm*)(malloc(sizeof(CFParm))); | | CFP = (CFParm*)(malloc(sizeof(CFParm))); |
val = check_spell_known( | | val = check_spell_known( |
(object *)(PParm->Value[0]), | | (object *)(PParm->Value[0]), |
*(int *)(PParm->Value[1]) | | (char *)(PParm->Value[1]) |
); | | ); |
CFP->Value[0] = &val; | | CFP->Value[0] = val; |
return CFP; | | return CFP; |
}; | | }; |
| | |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* 0 - object to increase experience of. */ | | /* 0 - object to increase experience of. */ |
/* 1 - amount of experience to add. */ | | /* 1 - amount of experience to add. */ |
| | /* 2 - skill name to add it to */ |
| | /* 3 - flags for this */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWAddExp(CFParm* PParm) | | CFParm* CFWAddExp(CFParm* PParm) |
{ | | { |
add_exp( | | change_exp( |
(object *)(PParm->Value[0]), | | (object *)(PParm->Value[0]), |
*(int *)(PParm->Value[1]) | | *(int *)(PParm->Value[1]), |
| | (char*)(PParm->Value[2]), |
| | *(int *)(PParm->Value[3]) |
); | | ); |
return(PParm); | | return(PParm); |
}; | | }; |