version 1.50 | | version 1.51 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.50 2001/11/11 09:39:54 gros Exp $"; | | * "$Id: apply.c,v 1.51 2001/11/11 12:37:10 tchize Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
case TRIGGER_BUTTON: | | case TRIGGER_BUTTON: |
case TRIGGER_PEDESTAL: | | case TRIGGER_PEDESTAL: |
case TRIGGER_ALTAR: | | case TRIGGER_ALTAR: |
#ifdef PLUGINS | | |
/* GROS: Handle for plugin trigger event */ | | |
if(trap->event_hook[EVENT_TRIGGER] != NULL) | | |
{ | | |
CFParm CFP; | | |
int k, l, m; | | |
k = EVENT_TRIGGER; | | |
l = SCRIPT_FIX_ALL; | | |
m = 0; | | |
CFP.Value[0] = &k; | | |
CFP.Value[1] = victim; | | |
CFP.Value[2] = trap; | | |
CFP.Value[3] = NULL; | | |
CFP.Value[4] = NULL; | | |
CFP.Value[5] = &m; | | |
CFP.Value[6] = &m; | | |
CFP.Value[7] = &m; | | |
CFP.Value[8] = &l; | | |
CFP.Value[9] = trap->event_hook[EVENT_TRIGGER]; | | |
CFP.Value[10]= trap->event_options[EVENT_TRIGGER]; | | |
if (findPlugin(trap->event_plugin[k])>=0) | | |
((PlugList[findPlugin(trap->event_plugin[EVENT_TRIGGER])].eventfunc) (&CFP)); | | |
} | | |
else | | |
#endif | | |
check_trigger (trap, victim); | | check_trigger (trap, victim); |
goto leave; | | goto leave; |
| | |
| | |
goto leave; | | goto leave; |
| | |
case CHECK_INV: | | case CHECK_INV: |
#ifdef PLUGINS | | |
/* GROS: Handle for plugin trigger event */ | | |
if(trap->event_hook[EVENT_TRIGGER] != NULL) | | |
{ | | |
CFParm CFP; | | |
int k, l, m; | | |
k = EVENT_TRIGGER; | | |
l = SCRIPT_FIX_ALL; | | |
m = 0; | | |
CFP.Value[0] = &k; | | |
CFP.Value[1] = victim; | | |
CFP.Value[2] = trap; | | |
CFP.Value[3] = NULL; | | |
CFP.Value[4] = NULL; | | |
CFP.Value[5] = &m; | | |
CFP.Value[6] = &m; | | |
CFP.Value[7] = &m; | | |
CFP.Value[8] = &l; | | |
CFP.Value[9] = trap->event_hook[k]; | | |
CFP.Value[10]= trap->event_options[k]; | | |
if (findPlugin(trap->event_plugin[k])>=0) | | |
((PlugList[findPlugin(trap->event_plugin[k])].eventfunc) (&CFP)); | | |
} | | |
else | | |
#endif | | |
check_inv (victim, trap); | | check_inv (victim, trap); |
goto leave; | | goto leave; |
| | |
| | |
*/ | | */ |
if (trap->msg && strncmp(EXIT_PATH(trap),"/!",2) && strncmp(EXIT_PATH(trap), "/random/", 8)) | | if (trap->msg && strncmp(EXIT_PATH(trap),"/!",2) && strncmp(EXIT_PATH(trap), "/random/", 8)) |
new_draw_info (NDI_NAVY, 0, victim, trap->msg); | | new_draw_info (NDI_NAVY, 0, victim, trap->msg); |
#ifdef PLUGINS | | |
/* GROS: Handle for plugin trigger event */ | | |
if(trap->event_hook[EVENT_TRIGGER] != NULL) | | |
{ | | |
CFParm CFP; | | |
int k, l, m; | | |
k = EVENT_TRIGGER; | | |
l = SCRIPT_FIX_ALL; | | |
m = 0; | | |
CFP.Value[0] = &k; | | |
CFP.Value[1] = victim; | | |
CFP.Value[2] = trap; | | |
CFP.Value[3] = NULL; | | |
CFP.Value[4] = NULL; | | |
CFP.Value[5] = &m; | | |
CFP.Value[6] = &m; | | |
CFP.Value[7] = &m; | | |
CFP.Value[8] = &l; | | |
CFP.Value[9] = trap->event_hook[k]; | | |
CFP.Value[10]= trap->event_options[k]; | | |
if (findPlugin(trap->event_plugin[k])>=0) | | |
((PlugList[findPlugin(trap->event_plugin[k])].eventfunc) (&CFP)); | | |
} | | |
#endif | | |
enter_exit (victim, trap); | | enter_exit (victim, trap); |
} | | } |
goto leave; | | goto leave; |
| | |
case RUNE: | | case RUNE: |
if (trap->level && QUERY_FLAG (victim, FLAG_ALIVE)) | | if (trap->level && QUERY_FLAG (victim, FLAG_ALIVE)) |
{ | | { |
#ifdef PLUGINS | | |
/* GROS: Handle for plugin trigger event */ | | |
if(trap->event_hook[EVENT_TRIGGER] != NULL) | | |
{ | | |
CFParm CFP; | | |
int k, l, m; | | |
k = EVENT_TRIGGER; | | |
l = SCRIPT_FIX_ALL; | | |
m = 0; | | |
CFP.Value[0] = &k; | | |
CFP.Value[1] = victim; | | |
CFP.Value[2] = trap; | | |
CFP.Value[3] = NULL; | | |
CFP.Value[4] = NULL; | | |
CFP.Value[5] = &m; | | |
CFP.Value[6] = &m; | | |
CFP.Value[7] = &m; | | |
CFP.Value[8] = &l; | | |
CFP.Value[9] = trap->event_hook[k]; | | |
CFP.Value[10]= trap->event_options[k]; | | |
if (findPlugin(trap->event_plugin[k])>=0) | | |
((PlugList[findPlugin(trap->event_plugin[k])].eventfunc) (&CFP)); | | |
} | | |
else | | |
#endif | | |
spring_trap(trap, victim); | | spring_trap(trap, victim); |
}; | | }; |
goto leave; | | goto leave; |