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:
@@ -359,7 +359,7 @@ copy_oextra(struct obj *obj2, struct obj *obj1)
|
||||
if (!obj2->oextra)
|
||||
obj2->oextra = newoextra();
|
||||
if (has_oname(obj1))
|
||||
oname(obj2, ONAME(obj1), ONAME_NO_FLAGS);
|
||||
oname(obj2, ONAME(obj1), ONAME_SKIP_INVUPD);
|
||||
if (has_omonst(obj1)) {
|
||||
if (!OMONST(obj2))
|
||||
newomonst(obj2);
|
||||
@@ -427,7 +427,7 @@ splitobj(struct obj *obj, long num)
|
||||
splitbill(obj, otmp);
|
||||
copy_oextra(otmp, obj);
|
||||
if (has_omid(otmp))
|
||||
free_omid(otmp); /* only one association with m_id*/
|
||||
free_omid(otmp); /* only one association with m_id */
|
||||
if (obj->timed)
|
||||
obj_split_timers(obj, otmp);
|
||||
if (obj_sheds_light(obj))
|
||||
|
||||
Reference in New Issue
Block a user