version 1.42 | | version 1.43 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.42 2001/06/13 12:51:58 michtoen Exp $"; | | * "$Id: apply.c,v 1.43 2001/06/29 05:59:46 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
* 0: player or monster can't apply objects of that type | | * 0: player or monster can't apply objects of that type |
* 2: objects of that type can't be applied if not in inventory | | * 2: objects of that type can't be applied if not in inventory |
* 1: has been applied, or there was an error applying the object | | * 1: has been applied, or there was an error applying the object |
| | * |
* op is the object that is causing object to be applied, tmp is the object | | * op is the object that is causing object to be applied, tmp is the object |
* being applied. | | * being applied. |
* | | * |
| | |
if (tmp->script_apply!=NULL) | | if (tmp->script_apply!=NULL) |
{ | | { |
rtn_script = guile_call_event(op,tmp, NULL, aflag, NULL,0,0,tmp->script_apply, SCRIPT_FIX_ALL); | | rtn_script = guile_call_event(op,tmp, NULL, aflag, NULL,0,0,tmp->script_apply, SCRIPT_FIX_ALL); |
if (rtn_script!=0) return; | | if (rtn_script!=0) return 1; |
}; | | }; |
if (tmp->script_str_apply!=NULL) | | if (tmp->script_str_apply!=NULL) |
{ | | { |
rtn_script = guile_call_event_str(op,tmp, NULL, aflag, NULL,0,0,tmp->script_str_apply, SCRIPT_FIX_ALL); | | rtn_script = guile_call_event_str(op,tmp, NULL, aflag, NULL,0,0,tmp->script_str_apply, SCRIPT_FIX_ALL); |
if (rtn_script!=0) return; | | if (rtn_script!=0) return 1; |
}; | | }; |
| | |
switch (tmp->type) | | switch (tmp->type) |