OSDN Git Service

[Refactor] #38844 max_d_idx を world_type 構造体に加える. / Move max_d_idx to world_type...
[hengband/hengband.git] / src / rumor.c
index 5579e5c..c2d2bdb 100644 (file)
@@ -1,6 +1,14 @@
 #include "angband.h"
+#include "util.h"
+
 #include "files.h"
 #include "object-flavor.h"
+#include "artifact.h"
+#include "dungeon.h"
+#include "monsterrace.h"
+#include "floor-town.h"
+#include "wild.h"
+#include "world.h"
 
 /*
  * Display a rumor and apply its effects
@@ -58,7 +66,8 @@ void display_rumor(bool ex)
                {
                        if (strcmp(zz[0], "ARTIFACT") == 0)
                        {
-                               IDX a_idx, k_idx;
+                               ARTIFACT_IDX a_idx;
+                               KIND_OBJECT_IDX k_idx;
                                object_type forge;
                                object_type *q_ptr = &forge;
                                artifact_type *a_ptr;
@@ -104,7 +113,7 @@ void display_rumor(bool ex)
 
                                while (1)
                                {
-                                       d_idx = rumor_num(zz[1], max_d_idx);
+                                       d_idx = rumor_num(zz[1], current_world_ptr->max_d_idx);
                                        d_ptr = &d_info[d_idx];
                                        if (d_ptr->name) break;
                                }