OSDN Git Service

[Fix] #38993 current_floor -> current_floor_ptr
[hengband/hengband.git] / src / autopick.c
index e13f4ea..098d3aa 100644 (file)
@@ -13,6 +13,8 @@
 
 #include "angband.h"
 #include "store.h"
+#include "player-status.h"
+#include "object-hook.h"
 
 #define MAX_LINELEN 1024
 
@@ -1656,7 +1658,7 @@ void autopick_delayed_alter(void)
                autopick_delayed_alter_aux(item);
 
        /* Scan the pile of objects */
-       item = cave[p_ptr->y][p_ptr->x].o_idx;
+       item = current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].o_idx;
        while (item)
        {
                OBJECT_IDX next = o_list[item].next_o_idx;
@@ -1698,12 +1700,12 @@ void autopick_alter_item(INVENTORY_IDX item, bool destroy)
 /*
  * Automatically pickup/destroy items in this grid.
  */
-void autopick_pickup_items(cave_type *c_ptr)
+void autopick_pickup_items(grid_type *g_ptr)
 {
        OBJECT_IDX this_o_idx, next_o_idx = 0;
        
        /* Scan the pile of objects */
-       for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
+       for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
        {
                int idx;
                        object_type *o_ptr = &o_list[this_o_idx];