summaryrefslogtreecommitdiff
path: root/src/cmd5.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/cmd5.cc
parent5ddcbbf1cdce68e565376819efedd519892512ad (diff)
Move r_info into GameEditData
Diffstat (limited to 'src/cmd5.cc')
-rw-r--r--src/cmd5.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd5.cc b/src/cmd5.cc
index bcf22124..a94f925a 100644
--- a/src/cmd5.cc
+++ b/src/cmd5.cc
@@ -542,6 +542,8 @@ void fetch(int dir, int wgt, bool_ require_los)
*/
std::string symbiote_name(bool capitalize)
{
+ auto const &r_info = game->edit_data.r_info;
+
object_type *o_ptr = &p_ptr->inventory[INVEN_CARRY];
std::string buf;
@@ -554,7 +556,7 @@ std::string symbiote_name(bool capitalize)
}
else
{
- monster_race *r_ptr = &r_info[o_ptr->pval];
+ auto r_ptr = &r_info[o_ptr->pval];
std::size_t i = 0;
if (r_ptr->flags & RF_UNIQUE)
@@ -1780,6 +1782,8 @@ static int use_monster_power_aux(monster_race const *r_ptr, bool great, bool sym
*/
int use_symbiotic_power(int r_idx, bool great)
{
+ auto const &r_info = game->edit_data.r_info;
+
monster_race const *r_ptr = &r_info[r_idx];
return use_monster_power_aux(r_ptr, great, true, [](monster_power const *) {
// Don't need to do anything post-cast.
@@ -1791,6 +1795,8 @@ int use_symbiotic_power(int r_idx, bool great)
*/
void use_monster_power(int r_idx, bool great)
{
+ auto const &r_info = game->edit_data.r_info;
+
monster_race const *r_ptr = &r_info[r_idx];
use_monster_power_aux(r_ptr, great, false, [r_ptr](monster_power const *power) {
// Sometimes give a free cast.