From a7e5c60e319cac49934179e0c81c44db5a548633 Mon Sep 17 00:00:00 2001 From: mogami Date: Sun, 2 Jun 2002 08:19:50 +0000 Subject: [PATCH] =?utf8?q?=E6=9C=80=E5=88=9D=E3=81=8B=E3=82=89{%}=E7=AD=89?= =?utf8?q?=E3=81=8C=E5=88=BB=E3=82=93=E3=81=A7=E3=81=82=E3=82=8B=E3=82=A2?= =?utf8?q?=E3=82=A4=E3=83=86=E3=83=A0=E3=82=92*=E9=91=91=E5=AE=9A*?= =?utf8?q?=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D=E3=80=81=E3=81=9D=E3=81=AE%?= =?utf8?q?=E3=82=92=E8=80=90=E6=80=A7=E5=88=BB=E3=81=BF=E3=81=A7=E5=B1=95?= =?utf8?q?=E9=96=8B=E3=81=99=E3=82=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/autopick.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/autopick.c b/src/autopick.c index 48ab39176..95eabb509 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -871,23 +871,27 @@ void auto_inscribe_item(int item, int idx) /* Get the item (on the floor) */ else o_ptr = &o_list[0 - item]; - if (idx >= 0 && autopick_list[idx].insc && !o_ptr->inscription) - { + /* Auto-inscription or Re-inscribe for resistances {%} */ + if ((idx < 0 || !autopick_list[idx].insc) && !o_ptr->inscription) + return; + + if (o_ptr->inscription) + o_ptr->inscription = inscribe_flags(o_ptr, quark_str(o_ptr->inscription)); + else o_ptr->inscription = inscribe_flags(o_ptr, autopick_list[idx].insc); - if (item > INVEN_PACK) - { - /* Redraw inscription */ - p_ptr->window |= (PW_EQUIP); + if (item > INVEN_PACK) + { + /* Redraw inscription */ + p_ptr->window |= (PW_EQUIP); - /* {.} and {$} effect p_ptr->warning and TRC_TELEPORT_SELF */ - p_ptr->update |= (PU_BONUS); - } - else if (item >= 0) - { - /* Redraw inscription */ - p_ptr->window |= (PW_INVEN); - } + /* {.} and {$} effect p_ptr->warning and TRC_TELEPORT_SELF */ + p_ptr->update |= (PU_BONUS); + } + else if (item >= 0) + { + /* Redraw inscription */ + p_ptr->window |= (PW_INVEN); } } -- 2.11.0