forked from github/server
support for old item
This commit is contained in:
parent
577601f912
commit
363c2e0d5b
2 changed files with 11 additions and 6 deletions
|
@ -555,15 +555,16 @@ read_items(struct storage * store, item **ilist)
|
|||
for (;;) {
|
||||
char ibuf[32];
|
||||
const item_type * itype;
|
||||
int i;
|
||||
store->r_str_buf(store, ibuf, sizeof(ibuf));
|
||||
if (!strcmp("end", ibuf)) break;
|
||||
itype = it_find(ibuf);
|
||||
assert(itype!=NULL);
|
||||
if (itype!=NULL) {
|
||||
int i = store->r_int(store);
|
||||
if (i<=0) {
|
||||
log_error(("data contains an entry with %d %s\n", i, itype->rtype->_name[1]));
|
||||
} else {
|
||||
i = store->r_int(store);
|
||||
if (i<=0) {
|
||||
log_error(("data contains an entry with %d %s\n", i, itype->rtype->_name[1]));
|
||||
} else {
|
||||
assert(itype!=NULL);
|
||||
if (itype!=NULL) {
|
||||
i_change(ilist, itype, i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
<item notlost="yes" weight="0"/>
|
||||
</resource>
|
||||
|
||||
<resource name="lebkuchenherz">
|
||||
<item notlost="yes" weight="0"/>
|
||||
</resource>
|
||||
|
||||
<!-- ambassador rewards -->
|
||||
<resource name="seashell">
|
||||
<item cursed="true" weight="0">
|
||||
|
|
Loading…
Reference in a new issue