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

@@ -1194,7 +1194,9 @@ unsigned doname_flags;
Strcat(bp, " (at the ready)");
}
}
if (!iflags.suppress_price && is_unpaid(obj)) {
/* treat 'restoring' like suppress_price because shopkeeper and
bill might not be available yet while restore is in progress */
if (!iflags.suppress_price && !restoring && is_unpaid(obj)) {
long quotedprice = unpaid_cost(obj, TRUE);
Sprintf(eos(bp), " (%s, %ld %s)",