OSDN Git Service

- またも符号を間違えて床の上のアイテムに対して自動刻みが正常動作しなかったので修正。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 14 May 2002 11:12:53 +0000 (11:12 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 14 May 2002 11:12:53 +0000 (11:12 +0000)
- {=g}と刻んだアイテムは自動破壊の対象からはずすはずだったのに、
  持ち物の中にあって鑑定したときは破壊してしまっていたので修正。

src/autopick.c

index 9926094..74e1708 100644 (file)
@@ -849,6 +849,8 @@ bool auto_destroy_item(s16b item, int autopick_idx)
        /* Get the item (on the floor) */
        else o_ptr = &o_list[0 - item];
 
+       /* Don't destroy an item inscribed {=g} */
+       if (is_autopick2(o_ptr)) return FALSE;
 
        if ((autopick_idx == -1 && is_opt_confirm_destroy(o_ptr)) ||
            (autopick_idx >= 0 && (autopick_list[autopick_idx].action & DO_AUTODESTROY)))
@@ -923,7 +925,8 @@ void auto_pickup_items(cave_type *c_ptr)
 
                idx = is_autopick(o_ptr);
 
-               auto_inscribe_item(this_o_idx, idx);
+               /* Item index for floor -1,-2,-3,...  */
+               auto_inscribe_item((-this_o_idx), idx);
 
                if (is_autopick2(o_ptr) ||
                    (idx >= 0 && (autopick_list[idx].action & DO_AUTOPICK)))