summaryrefslogtreecommitdiff
path: root/src/q_rand.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
committerBardur Arantsson <bardur@scientician.net>2016-10-05 18:49:37 +0200
commit0c2f30b56c221a826ba64f0ec864c29d0f717644 (patch)
treea7b38e7b9cf9a06aacd56ec8a7177d44d001c1df /src/q_rand.cc
parent5ddcbbf1cdce68e565376819efedd519892512ad (diff)
Move r_info into GameEditData
Diffstat (limited to 'src/q_rand.cc')
-rw-r--r--src/q_rand.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/q_rand.cc b/src/q_rand.cc
index 9606ea7b..019f4b71 100644
--- a/src/q_rand.cc
+++ b/src/q_rand.cc
@@ -56,6 +56,7 @@ GENERATE_MONSTER_LOOKUP_FN(get_adventurer, "Adventurer")
void initialize_random_quests(int n)
{
auto const &d_info = game->edit_data.d_info;
+ auto &r_info = game->edit_data.r_info;
int step, lvl, i, k;
int old_type = dungeon_type;
@@ -437,6 +438,8 @@ static bool_ quest_random_turn_hook(void *, void *, void *)
static bool_ quest_random_feeling_hook(void *, void *, void *)
{
+ auto const &r_info = game->edit_data.r_info;
+
if (!(dungeon_flags & DF_PRINCIPAL)) return (FALSE);
if ((dun_level < 1) || (dun_level >= MAX_RANDOM_QUEST)) return (FALSE);
if (!random_quests[dun_level].type) return (FALSE);
@@ -616,6 +619,8 @@ static bool_ quest_random_dump_hook(void *, void *in_, void *)
std::string quest_random_describe()
{
+ auto const &r_info = game->edit_data.r_info;
+
// Only emit description if we're actually on a
// random quest level.
if (!(dungeon_flags & DF_PRINCIPAL)) return "";