version 1.35 | | version 1.36 |
---|
| | |
/* | | /* |
* static char *rcsid_gods_c = | | * static char *rcsid_gods_c = |
* "$Id: gods.c,v 1.35 2002/12/13 05:09:49 garbled Exp $"; | | * "$Id: gods.c,v 1.36 2003/06/26 11:27:43 gros Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
void pray_at_altar(object *pl, object *altar) { | | void pray_at_altar(object *pl, object *altar) { |
object *pl_god=find_god(determine_god(pl)); | | object *pl_god=find_god(determine_god(pl)); |
int return_pray_script; /* GROS : This is for return value of script */ | | int return_pray_script; /* GROS : This is for return value of script */ |
| | event *evt; |
| | |
/* GROS: Handle for plugin altar-parying (apply) event */ | | /* GROS: Handle for plugin altar-parying (apply) event */ |
if(altar->event_hook[EVENT_APPLY] != NULL) | | if ((evt = find_event(altar, EVENT_APPLY)) != NULL) |
{ | | { |
CFParm CFP; | | CFParm CFP; |
CFParm* CFR; | | CFParm* CFR; |
| | |
CFP.Value[6] = &m; | | CFP.Value[6] = &m; |
CFP.Value[7] = &m; | | CFP.Value[7] = &m; |
CFP.Value[8] = &l; | | CFP.Value[8] = &l; |
CFP.Value[9] = altar->event_hook[k]; | | CFP.Value[9] = evt->hook; |
CFP.Value[10]= altar->event_options[k]; | | CFP.Value[10]= evt->options; |
if (findPlugin(altar->event_plugin[k])>=0) | | if (findPlugin(evt->plugin)>=0) |
{ | | { |
CFR = (PlugList[findPlugin(altar->event_plugin[k])].eventfunc) (&CFP); | | CFR = (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP); |
return_pray_script = *(int *)(CFR->Value[0]); | | return_pray_script = *(int *)(CFR->Value[0]); |
free(CFR); | | free(CFR); |
if (return_pray_script) return; | | if (return_pray_script) return; |