version 1.69 | | version 1.70 |
---|
| | |
/* | | /* |
* static char *rcsid_skills_c = | | * static char *rcsid_skills_c = |
* "$Id: skills.c,v 1.69 2005/12/23 21:56:57 akirschbaum Exp $"; | | * "$Id: skills.c,v 1.70 2006/01/01 20:57:25 akirschbaum Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
return (object *) NULL; | | return (object *) NULL; |
} | | } |
| | |
| | /* prefer marked item */ |
| | tmp = find_marked_object(op); |
| | if (tmp != NULL) { |
| | /* can't toss invisible or inv-locked items */ |
| | if (tmp->invisible || QUERY_FLAG(tmp, FLAG_INV_LOCKED)) { |
| | tmp = NULL; |
| | } |
| | } |
| | |
/* look through the inventory */ | | /* look through the inventory */ |
for(tmp=op->inv;tmp;tmp=tmp->below) { | | if (tmp == NULL) { |
| | for (tmp = op->inv; tmp != NULL; tmp = tmp->below) { |
/* can't toss invisible or inv-locked items */ | | /* can't toss invisible or inv-locked items */ |
if(tmp->invisible||QUERY_FLAG(tmp,FLAG_INV_LOCKED)) continue; | | if (tmp->invisible || QUERY_FLAG(tmp, FLAG_INV_LOCKED)) |
if(!request || !strcmp(query_name(tmp),request) || !strcmp(tmp->name,request)) | | continue; |
| | if (!request |
| | || !strcmp(query_name(tmp), request) |
| | || !strcmp(tmp->name, request)) |
break; | | break; |
} | | } |
| | } |
| | |
/* this should prevent us from throwing away | | /* this should prevent us from throwing away |
* cursed items, worn armour, etc. Only weapons | | * cursed items, worn armour, etc. Only weapons |