OSDN Git Service

[Fix] #38993 current_floor -> current_floor_ptr
[hengbandforosx/hengbandosx.git] / src / quest.c
index e6d79c0..b8c8632 100644 (file)
@@ -263,7 +263,7 @@ void check_quest_completion(monster_type *m_ptr)
                POSITION ny, nx;
 
                /* Stagger around */
-               while (cave_perma_bold(y, x) || cave[y][x].o_idx || (cave[y][x].info & CAVE_OBJECT))
+               while (cave_perma_bold(y, x) || current_floor_ptr->grid_array[y][x].o_idx || (current_floor_ptr->grid_array[y][x].info & CAVE_OBJECT))
                {
                        /* Pick a location */
                        scatter(&ny, &nx, y, x, 1, 0);
@@ -394,7 +394,7 @@ QUEST_IDX quest_number(DEPTH level)
                if ((quest[i].type == QUEST_TYPE_KILL_LEVEL) &&
                        !(quest[i].flags & QUEST_FLAG_PRESET) &&
                        (quest[i].level == level) &&
-                       (quest[i].dungeon == dungeon_type))
+                       (quest[i].dungeon == p_ptr->dungeon_idx))
                        return (i);
        }
 
@@ -411,7 +411,7 @@ QUEST_IDX random_quest_number(DEPTH level)
 {
        QUEST_IDX i;
 
-       if (dungeon_type != DUNGEON_ANGBAND) return 0;
+       if (p_ptr->dungeon_idx != DUNGEON_ANGBAND) return 0;
 
        for (i = MIN_RANDOM_QUEST; i < MAX_RANDOM_QUEST + 1; i++)
        {