diff --git a/src/invent.c b/src/invent.c index eab574ee6..f6bb20454 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2331,7 +2331,7 @@ learn_unseen_invent(void) return; /* sanity check */ for (otmp = g.invent; otmp; otmp = otmp->nobj) { - if (otmp->dknown) + if (otmp->dknown && (otmp->bknown || !Role_if(PM_CLERIC))) continue; /* already seen */ /* set dknown, perhaps bknown (for priest[ess]) */ (void) xname(otmp); diff --git a/win/Qt/qt_inv.cpp b/win/Qt/qt_inv.cpp index ca9eda461..50f17f47c 100644 --- a/win/Qt/qt_inv.cpp +++ b/win/Qt/qt_inv.cpp @@ -83,10 +83,15 @@ void NetHackQtInvUsageWindow::drawWorn(QPainter &painter, obj *nhobj, if (nhobj) { border = BORDER_DEFAULT; + // don't expect this to happen but check just in case; + // learn_unseen_invent() is normally called when regaining sight + // and sets dknown and maybe bknown, then updates perm_invent (do + // it regardless of ENHANCED_PAPERDOLL for same effect either way) + if (!Blind && (!nhobj->dknown + || (Role_if(PM_CLERIC) && !nhobj->bknown))) + ::learn_unseen_invent(); #ifdef ENHANCED_PAPERDOLL // color margin around cell containing item whose BUC state is known - if (Role_if('P') && !Blind) - nhobj->bknown = 1; if (nhobj->bknown) border = nhobj->cursed ? BORDER_CURSED : !nhobj->blessed ? BORDER_UNCURSED