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

@@ -112,7 +112,6 @@ register struct obj *obj;
: !is_weptool(obj) && !is_wet_towel(obj);
} else
unweapon = TRUE; /* for "bare hands" message */
update_inventory();
}
STATIC_OVL boolean
@@ -230,7 +229,9 @@ setuqwep(obj)
register struct obj *obj;
{
setworn(obj, W_QUIVER);
update_inventory();
/* no extra handling needed; this used to include a call to
update_inventory() but that's already performed by setworn() */
return;
}
void
@@ -238,7 +239,7 @@ setuswapwep(obj)
register struct obj *obj;
{
setworn(obj, W_SWAPWEP);
update_inventory();
return;
}
/*** Commands to change particular slot(s) ***/