version 1.60 | | version 1.61 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.60 2005/11/16 08:16:09 mwedel Exp $"; | | * "$Id: skill_util.c,v 1.61 2005/11/27 14:16:46 ryo_saeba Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
* simpler. | | * simpler. |
*/ | | */ |
| | |
void show_skills(object *op) { | | void show_skills(object *op, const char* search) { |
object *tmp=NULL; | | object *tmp=NULL; |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
const char *cp; | | const char *cp; |
| | |
| | |
for (tmp=op->inv; tmp!=NULL; tmp=tmp->below) { | | for (tmp=op->inv; tmp!=NULL; tmp=tmp->below) { |
if (tmp->type == SKILL) { | | if (tmp->type == SKILL) { |
| | if ( search && strstr(tmp->name,search)==NULL ) continue; |
/* Basically want to fill this out to 40 spaces with periods */ | | /* Basically want to fill this out to 40 spaces with periods */ |
sprintf(buf,"%s%s", tmp->name, periods); | | sprintf(buf,"%s%s", tmp->name, periods); |
buf[40] = 0; | | buf[40] = 0; |