version 1.9 | | version 1.10 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.9 2000/04/12 06:28:09 cvs Exp $"; | | * "$Id: apply.c,v 1.10 2000/04/12 06:38:04 cvs Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
/* apply returns 0 if it wasn't possible to apply that object, 1 | | /* apply returns 0 if it wasn't possible to apply that object, 1 |
* if the object was applied, 2 if the object is now a different | | * if the object was applied, 2 if the object is now a different |
* object. | | * object. |
| | * |
| | * crossfire-0.95.5: Return value of apply() is currently used by |
| | * apply_below() in apply.c, apply_inventory() in c_object.c and |
| | * check_good_weapon()/check_good_armour() in monster.c |
| | * |
*/ | | */ |
/* 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. |
| | |
break; | | break; |
case ENCOUNTER: | | case ENCOUNTER: |
#ifdef RANDOM_ENCOUNTERS | | #ifdef RANDOM_ENCOUNTERS |
| | if (op->type == PLAYER && QUERY_FLAG (op, FLAG_IS_FLOOR)) |
| | { |
random_encounter(op, tmp); | | random_encounter(op, tmp); |
| | return 1; |
| | } |
#endif | | #endif |
break; | | return 0; |
case SHOP_MAT: | | case SHOP_MAT: |
{ | | { |
SET_FLAG(op,FLAG_NO_APPLY); | | SET_FLAG(op,FLAG_NO_APPLY); |
| | |
for ( ; tmp!=NULL; tmp=next) { | | for ( ; tmp!=NULL; tmp=next) { |
next = tmp->below; | | next = tmp->below; |
if (apply(op, tmp, 0)) return; | | if (apply(op, tmp, 0)) return; |
| | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) |
| | return; /* don't look below a floor */ |
} | | } |
} | | } |
| | |