version 1.105 | | version 1.106 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.105 2004/04/26 05:27:36 mwedel Exp $"; | | * "$Id: apply.c,v 1.106 2004/05/05 07:25:54 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
tmp2 = arch_to_object(op->other_arch); | | tmp2 = arch_to_object(op->other_arch); |
tmp2->stats.food = op->stats.food; | | tmp2->stats.food = op->stats.food; |
SET_FLAG(tmp2, FLAG_APPLIED); | | SET_FLAG(tmp2, FLAG_APPLIED); |
if (tmp == NULL) { | | insert_ob_in_ob(tmp2, who); |
| | |
| | /* Remove the old lantern */ |
if (who->type == PLAYER) | | if (who->type == PLAYER) |
esrv_del_item(who->contr, (tag_t)op->count); | | esrv_del_item(who->contr, (tag_t)op->count); |
remove_ob(op); | | remove_ob(op); |
free_object(op); | | free_object(op); |
} else { | | |
| | /* insert the portion that was split off */ |
| | if(tmp!=NULL) { |
| | (void) insert_ob_in_ob(tmp,who); |
if (who->type == PLAYER) | | if (who->type == PLAYER) |
esrv_del_item(who->contr, (tag_t)tmp->count); | | esrv_send_item(who, tmp); |
remove_ob(tmp); | | |
free_object(tmp); | | |
} | | } |
insert_ob_in_ob(tmp2, who); | | |
fix_player(who); | | fix_player(who); |
if (QUERY_FLAG(op, FLAG_CURSED) || QUERY_FLAG(op, FLAG_DAMNED)) { | | if (QUERY_FLAG(op, FLAG_CURSED) || QUERY_FLAG(op, FLAG_DAMNED)) { |
if (who->type == PLAYER) { | | if (who->type == PLAYER) { |