version 1.55 | | version 1.56 |
---|
| | |
/* | | /* |
* static char *rcsid_item_c = | | * static char *rcsid_item_c = |
* "$Id: item.c,v 1.55 2005/11/16 08:16:00 mwedel Exp $"; | | * "$Id: item.c,v 1.56 2006/01/07 18:56:51 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if (! QUERY_FLAG(op, FLAG_IDENTIFIED)) | | if (! QUERY_FLAG(op, FLAG_IDENTIFIED)) |
return buf; | | return buf; |
| | |
for (attr=0; attr<7; attr++) { | | for (attr=0; attr<NUM_STATS; attr++) { |
if ((val=get_attr_value(&(op->stats),attr))!=0) { | | if ((val=get_attr_value(&(op->stats),attr))!=0) { |
sprintf (buf+strlen(buf), "(%s%+d)", short_stat_name[attr], val); | | sprintf (buf+strlen(buf), "(%s%+d)", short_stat_name[attr], val); |
} | | } |
| | |
if (identified || QUERY_FLAG(op,FLAG_BEEN_APPLIED)) { | | if (identified || QUERY_FLAG(op,FLAG_BEEN_APPLIED)) { |
int attr,val; | | int attr,val; |
| | |
for (attr=0; attr<7; attr++) { | | for (attr=0; attr<NUM_STATS; attr++) { |
if ((val=get_attr_value(&(op->stats),attr))!=0) { | | if ((val=get_attr_value(&(op->stats),attr))!=0) { |
sprintf(buf, "(%s%+d)", short_stat_name[attr], val); | | sprintf(buf, "(%s%+d)", short_stat_name[attr], val); |
strcat(retbuf,buf); | | strcat(retbuf,buf); |
| | |
return 1; | | return 1; |
| | |
/* Check to see if it increases/decreases any stats */ | | /* Check to see if it increases/decreases any stats */ |
for (i=0; i<7; i++) | | for (i=0; i<NUM_STATS; i++) |
if (get_attr_value(&(op->stats),i)!=0) return 1; | | if (get_attr_value(&(op->stats),i)!=0) return 1; |
| | |
/* If it doesn't fall into any of the above categories, must | | /* If it doesn't fall into any of the above categories, must |