summaryrefslogtreecommitdiff
path: root/src/traps.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:38 +0200
commit1bbed63b66c0f69809e698576a51501150f06bba (patch)
treef458361c0c2e7dac2502b1aace63d83d5dbd15b4 /src/traps.cc
parentb9fca0267b1d6a32d57e1fb4387f52c19d1c3fa6 (diff)
Move k_info into GameEditData
Diffstat (limited to 'src/traps.cc')
-rw-r--r--src/traps.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/traps.cc b/src/traps.cc
index f5abe202..0f80f8d6 100644
--- a/src/traps.cc
+++ b/src/traps.cc
@@ -2659,6 +2659,7 @@ bool_ mon_hit_trap_aux_potion(int m_idx, object_type *o_ptr)
bool_ mon_hit_trap(int m_idx)
{
auto const &r_info = game->edit_data.r_info;
+ auto const &k_info = game->edit_data.k_info;
monster_type *m_ptr = &m_list[m_idx];
auto r_ptr = &r_info[m_ptr->r_idx];
@@ -3028,7 +3029,7 @@ bool_ mon_hit_trap(int m_idx)
if (load_o_ptr->tval == TV_ROD_MAIN)
{
/* Extract mana cost of the rod tip */
- object_kind *tip_o_ptr = &k_info[lookup_kind(TV_ROD, load_o_ptr->pval)];
+ auto tip_o_ptr = &k_info[lookup_kind(TV_ROD, load_o_ptr->pval)];
auto const tflags = object_flags(load_o_ptr);
cost = (tflags & TR_CHEAPNESS) ? tip_o_ptr->pval / 2 : tip_o_ptr->pval;
if (cost <= 0) cost = 1;