version 1.3 | | version 1.4 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.3 2000/12/04 00:40:03 cvs Exp $"; | | * "$Id: player.c,v 1.4 2000/12/06 06:06:38 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
/* find_skill() - looks for the skill and returns a pointer to it if found */ | | /* find_skill() - looks for the skill and returns a pointer to it if found */ |
| | |
object *find_skill(object *op, int skillnr) { | | object *find_skill(object *op, int skillnr) { |
object *tmp; | | object *tmp, *skill1=NULL; |
#ifdef LINKED_SKILL_LIST | | #ifdef LINKED_SKILL_LIST |
objectlink *obl; | | objectlink *obl; |
| | |
| | |
| | |
/* *sigh*; we didnt find it. Perhaps because the skill we requested | | /* *sigh*; we didnt find it. Perhaps because the skill we requested |
* is an unapplied tool. Lets search entire inventory */ | | * is an unapplied tool. Lets search entire inventory */ |
for(tmp=op->inv;tmp;tmp=tmp->below) | | for (tmp=op->inv;tmp;tmp=tmp->below) { |
if(tmp->type==SKILL&&tmp->stats.sp==skillnr) | | if(tmp->type==SKILL&&tmp->stats.sp==skillnr) { |
return tmp; | | if (tmp->invisible) return tmp; |
| | else skill1=tmp; |
return ((object *) NULL); | | } |
| | } |
| | return skill1; |
} | | } |