fix #K3496 - leash description when pet changes
If persistent inventory is displayed and contains an entry for a leash attached to a pet and the pet's type or name changes, the perm_invent window didn't get updated to reflect the new leash information: x - leash (attached to <mon>) Report was for polymorph but applied to growing into bigger form and to being (re-/un-)christened as well.
This commit is contained in:
11
src/mon.c
11
src/mon.c
@@ -4345,8 +4345,15 @@ newcham(
|
||||
/* take on the new form... */
|
||||
set_mon_data(mtmp, mdat);
|
||||
|
||||
if (mtmp->mleashed && !leashable(mtmp))
|
||||
m_unleash(mtmp, TRUE);
|
||||
if (mtmp->mleashed) {
|
||||
if (!leashable(mtmp))
|
||||
m_unleash(mtmp, TRUE);
|
||||
else
|
||||
/* if leashed, persistent inventory window needs updating
|
||||
(really only when mon_nam() is going to yield "a frog"
|
||||
rather than "Kermit" but no need to micromanage here) */
|
||||
update_inventory(); /* x - leash (attached to a <mon>) */
|
||||
}
|
||||
|
||||
if (emits_light(olddata) != emits_light(mtmp->data)) {
|
||||
/* used to give light, now doesn't, or vice versa,
|
||||
|
||||
Reference in New Issue
Block a user