version 1.84 | | version 1.85 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.84 2005/10/04 01:00:04 cavesomething Exp $"; | | * "$Id: map.c,v 1.85 2005/10/04 01:39:36 cavesomething Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
static void *print_shop_string(mapstruct *m, char *output_string) { | | static void *print_shop_string(mapstruct *m, char *output_string) { |
int i; | | int i; |
char tmp[MAX_BUF]; | | char tmp[MAX_BUF]; |
shopitems *items=m->shopitems; | | |
sprintf(output_string, "\0"); | | sprintf(output_string, "\0"); |
for (i=0; i<items[0].index; i++) { | | for (i=0; i< m->shopitems[0].index; i++) { |
if (items[i].name) { | | if (m->shopitems[i].typenum) { |
if (items[i].strength) { | | if (m->shopitems[i].strength) { |
sprintf(tmp, "%s:%s;", items[i].name, items[i].strength); | | sprintf(tmp, "%s:%d;", m->shopitems[i].name, m->shopitems[i].strength); |
} | | } |
else sprintf(tmp, "%s;", items[i].name); | | else sprintf(tmp, "%s;", m->shopitems[i].name); |
} | | } |
else { | | else { |
if (items[i].strength) { | | if (m->shopitems[i].strength) { |
sprintf(tmp, "*:%s;", items[i].strength); | | sprintf(tmp, "*:%d;", m->shopitems[i].strength); |
} | | } |
else sprintf(tmp, "*"); | | else sprintf(tmp, "*"); |
} | | } |