version 1.8 | | version 1.9 |
---|
| | |
/* | | /* |
* static char *rcsid_utils_c = | | * static char *rcsid_utils_c = |
* "$Id: utils.c,v 1.8 2003/02/06 08:08:49 garbled Exp $"; | | * "$Id: utils.c,v 1.9 2003/02/07 06:57:17 garbled Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
void set_materialname(object *op, int difficulty) | | void set_materialname(object *op, int difficulty) |
{ | | { |
materialtype_t *mt, *lmt; | | materialtype_t *mt, *lmt; |
char tmpbuf[MAX_BUF]; | | |
int j; | | int j; |
| | |
if (op->materialname != NULL) | | if (op->materialname != NULL) |
| | |
if (IS_WEAPON(op) || IS_ARMOR(op)) { | | if (IS_WEAPON(op) || IS_ARMOR(op)) { |
op->weight = (op->weight * lmt->weight)/100; | | op->weight = (op->weight * lmt->weight)/100; |
op->value = (op->value * lmt->value)/100; | | op->value = (op->value * lmt->value)/100; |
sprintf(tmpbuf, "%s %s", lmt->description, op->name); | | |
free_string(op->name); | | |
op->name = add_string(tmpbuf); | | |
sprintf(tmpbuf, "%s %s", lmt->description, op->name_pl); | | |
free_string(op->name_pl); | | |
op->name_pl = add_string(tmpbuf); | | |
} | | } |
} | | } |
} | | } |