diff options
Diffstat (limited to 'src/q_nazgul.cc')
-rw-r--r-- | src/q_nazgul.cc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/q_nazgul.cc b/src/q_nazgul.cc index 99735eed..6eda1db1 100644 --- a/src/q_nazgul.cc +++ b/src/q_nazgul.cc @@ -15,6 +15,7 @@ #include "util.hpp" #include "variable.hpp" #include "z-rand.hpp" +#include "z-term.hpp" #include <cassert> @@ -24,11 +25,10 @@ GENERATE_MONSTER_LOOKUP_FN(get_uvatha, "Uvatha the Horseman") static bool quest_nazgul_gen_hook(void *, void *in_, void *) { - struct hook_wild_gen_in *in = static_cast<struct hook_wild_gen_in *>(in_); + auto in = static_cast<struct hook_wild_gen_in const *>(in_); int m_idx, x = 1, y = 1, tries = 10000; - bool_ small = in->small; - if ((cquest.status != QUEST_STATUS_TAKEN) || (small) || (p_ptr->town_num != 1)) + if ((cquest.status != QUEST_STATUS_TAKEN) || in->small || (p_ptr->town_num != 1)) { return false; } @@ -51,9 +51,9 @@ static bool quest_nazgul_gen_hook(void *, void *in_, void *) /* Place the nazgul */ int r_idx = get_uvatha(); - m_allow_special[r_idx] = TRUE; - m_idx = place_monster_one(y, x, r_idx, 0, FALSE, MSTATUS_ENEMY); - m_allow_special[r_idx] = FALSE; + m_allow_special[r_idx] = true; + m_idx = place_monster_one(y, x, r_idx, 0, false, MSTATUS_ENEMY); + m_allow_special[r_idx] = false; if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST; @@ -79,16 +79,13 @@ static bool quest_nazgul_finish_hook(void *, void *in_, void *) object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_ATHELAS)); q_ptr->found = OBJ_FOUND_REWARD; q_ptr->number = 6; - object_aware(q_ptr); - object_known(q_ptr); - q_ptr->ident |= IDENT_STOREB; - inven_carry(q_ptr, FALSE); + inven_carry(q_ptr, false); /* End the plot */ *(quest[q_idx].plot) = QUEST_NULL; del_hook_new(HOOK_QUEST_FINISH, quest_nazgul_finish_hook); - process_hooks_restart = TRUE; + process_hooks_restart = true; return true; } @@ -143,7 +140,7 @@ static bool quest_nazgul_death_hook(void *, void *in_, void *) cquest.status = QUEST_STATUS_COMPLETED; del_hook_new(HOOK_MONSTER_DEATH, quest_nazgul_death_hook); - process_hooks_restart = TRUE; + process_hooks_restart = true; return false; } |