OSDN Git Service

鑑定時の自動破壊で装備品を壊していたバグ修正。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 31 May 2002 12:31:28 +0000 (12:31 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 31 May 2002 12:31:28 +0000 (12:31 +0000)
src/autopick.c

index b12911c..ab60553 100644 (file)
@@ -806,7 +806,7 @@ void auto_inscribe_item(int item, int idx)
        {
                o_ptr->inscription = inscribe_flags(o_ptr, autopick_list[idx].insc);
 
-               if (item >= INVEN_RARM)
+               if (item > INVEN_PACK)
                {
                        /* Redraw inscription */
                        p_ptr->window |= (PW_EQUIP);
@@ -831,6 +831,9 @@ bool auto_destroy_item(int item, int autopick_idx)
        char o_name[MAX_NLEN];
        object_type *o_ptr;
 
+       /* Don't destroy equipped items */
+       if (item > INVEN_PACK) return FALSE;
+
        /* Get the item (in the pack) */
        if (item >= 0) o_ptr = &inventory[item];