object name assignment vs persistent inventory

This is an alternate way to deal with pull request #876, where
splitting a stack that has a name assigned updated perm_invent when
cloning the name and ran into trouble with shop billing when trying
to format for persistent inventory display.

The PR#876 fix has been left in place but wouldn't have been needed
if this had gone in first.
This commit is contained in:
PatR
2022-09-26 14:25:06 -07:00
parent caf1eeebf9
commit 0735b790f9
4 changed files with 9 additions and 6 deletions

View File

@@ -726,7 +726,7 @@ merged(struct obj **potmp, struct obj **pobj)
else if (!Is_pudding(otmp))
otmp->owt += obj->owt;
if (!has_oname(otmp) && has_oname(obj))
otmp = *potmp = oname(otmp, ONAME(obj), ONAME_NO_FLAGS);
otmp = *potmp = oname(otmp, ONAME(obj), ONAME_SKIP_INVUPD);
obj_extract_self(obj);
if (obj->pickup_prev && otmp->where == OBJ_INVENT)