restore vs perm_invent

Redo how updates of permanent inventory window are suppressed during
restore.  Reverses part of e9f1e03271
which included a simpler attempt to deal with this.

It looks like we should have been getting impossible "unpaid_cost:
object wasn't on any bill" but segfault was reported; I haven't tried
to figure out why.  The band in xname() ought to be redundant now but
is included for bulletproofing.
This commit is contained in:
PatR
2018-07-05 16:06:31 -07:00
parent 2596052c39
commit 777d9d922d
5 changed files with 28 additions and 17 deletions

View File

@@ -106,8 +106,7 @@ long mask;
}
}
}
if (!restoring)
update_inventory();
update_inventory();
}
/* called e.g. when obj is destroyed */
@@ -138,9 +137,7 @@ register struct obj *obj;
if ((p = w_blocks(obj, wp->w_mask)) != 0)
u.uprops[p].blocked &= ~wp->w_mask;
}
/* setnotworn() isn't called during restore but parallel setworn() */
if (!restoring)
update_inventory();
update_inventory();
}
/* return item worn in slot indiciated by wornmask; needed by poly_obj() */