OSDN Git Service

最初から{%}等が刻んであるアイテムを*鑑定*したとき、その%を耐性刻みで展開する。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 2 Jun 2002 08:19:50 +0000 (08:19 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 2 Jun 2002 08:19:50 +0000 (08:19 +0000)
src/autopick.c

index 48ab391..95eabb5 100644 (file)
@@ -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);
        }
 }