version 1.23 | | version 1.24 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.23 2002/01/25 10:53:37 gros Exp $"; | | * "$Id: skill_util.c,v 1.24 2002/03/01 21:33:11 avogl Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| | |
} | | } |
| | |
| | /* |
| | * Looks for the skill of specified name in op's inventory. |
| | * |
| | * attributes: |
| | * object *op the object to be searched (most likely a player) |
| | * char *skname name of the desired skill |
| | * |
| | * return: |
| | * object * the skill object if found, otherwise NULL |
| | */ |
| | object *get_skill_from_inventory(object *op, const char *skname) { |
| | object *tmp; /* search index */ |
| | |
| | if (op == NULL) return NULL; |
| | |
| | for (tmp=op->inv; tmp!=NULL; tmp=tmp->below) { |
| | if (tmp->type == SKILL && strcmp(tmp->name, skname)==0) |
| | return tmp; |
| | } |
| | } |