From b8217594611acef00d62416c9e932fcbe85a61d7 Mon Sep 17 00:00:00 2001 From: deskull Date: Wed, 13 Nov 2019 08:27:52 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38997=20do=5Fcmd=5Fsummon=5Fhorde(?= =?utf8?q?)=20=E3=81=AB=20player=5Ftype=20*=20=E5=BC=95=E6=95=B0=E3=82=92?= =?utf8?q?=E8=BF=BD=E5=8A=A0=EF=BC=8E=20/=20Add=20player=5Ftype=20*=20argu?= =?utf8?q?ment=20to=20do=5Fcmd=5Fsummon=5Fhorde().?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/wizard2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wizard2.c b/src/wizard2.c index a49a6891f..bab01b394 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -93,15 +93,15 @@ static void wiz_create_named_art(void) * @brief ウィザードモード用モンスターの群れ生成 / Summon a horde of monsters * @return なし */ -static void do_cmd_summon_horde(void) +static void do_cmd_summon_horde(player_type *caster_ptr) { - POSITION wy = p_ptr->y, wx = p_ptr->x; + POSITION wy = caster_ptr->y, wx = caster_ptr->x; int attempts = 1000; while (--attempts) { - scatter(&wy, &wx, p_ptr->y, p_ptr->x, 3, 0); - if (cave_empty_bold(p_ptr->current_floor_ptr, wy, wx)) break; + scatter(&wy, &wx, caster_ptr->y, caster_ptr->x, 3, 0); + if (cave_empty_bold(caster_ptr->current_floor_ptr, wy, wx)) break; } (void)alloc_horde(wy, wx); @@ -1766,7 +1766,7 @@ void do_cmd_debug(player_type *creature_ptr) break; case 'H': - do_cmd_summon_horde(); + do_cmd_summon_horde(creature_ptr); break; /* Identify */ -- 2.11.0