OSDN Git Service

性格いかさまでアイテムを拾った際にdestroy_identifyが有効の場合は自動
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 4 Sep 2003 15:35:39 +0000 (15:35 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 4 Sep 2003 15:35:39 +0000 (15:35 +0000)
破壊を使えるように変更. 通常の鑑定と同じ動作とした.

src/cmd1.c

index 8c98373..819ecb0 100644 (file)
@@ -808,10 +808,19 @@ void py_pickup_aux(int o_idx)
 
        if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)
        {
-               identify_item(o_ptr);
+               int idx;
+               bool old_known = identify_item(o_ptr);
 
-               /* Auto-inscription */
-               auto_inscribe_item(slot, is_autopick(o_ptr));
+               /* Auto-inscription/destroy */
+               idx = is_autopick(o_ptr);
+               auto_inscribe_item(slot, idx);
+               if (destroy_identify && !old_known)
+               {
+                       if (auto_destroy_item(slot, idx))
+                       {
+                               if (o_ptr->marked & OM_AUTODESTROY) return;
+                       }
+               }
        }
 
        /* Describe the object */