From b0d3f85ea123386c8b215fd4bb5ea56855483172 Mon Sep 17 00:00:00 2001 From: deskull Date: Mon, 8 Jul 2019 12:17:04 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38997=20get=5Fplayer=5Frace()=20?= =?utf8?q?=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?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/birth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/birth.c b/src/birth.c index 5fa7d6ad3..f08cd8f51 100644 --- a/src/birth.c +++ b/src/birth.c @@ -2483,7 +2483,7 @@ void player_outfit(player_type *creature_ptr) * @brief プレイヤーの種族選択を行う / Player race * @return なし */ -static bool get_player_race(void) +static bool get_player_race(player_type *creature_ptr) { int k, n, cs, os; concptr str; @@ -2518,7 +2518,7 @@ static bool get_player_race(void) /* Choose */ k = -1; - cs = p_ptr->prace; + cs = creature_ptr->prace; os = MAX_RACES; while (1) { @@ -2626,9 +2626,9 @@ static bool get_player_race(void) } /* Set race */ - p_ptr->prace = (byte_hack)k; + creature_ptr->prace = (byte_hack)k; - rp_ptr = &race_info[p_ptr->prace]; + rp_ptr = &race_info[creature_ptr->prace]; /* Display */ c_put_str(TERM_L_BLUE, rp_ptr->title, 4, 15); @@ -4020,7 +4020,7 @@ static bool player_birth_aux(player_type *creature_ptr) char temp[80*10]; concptr t; - if (!get_player_race()) return FALSE; + if (!get_player_race(creature_ptr)) return FALSE; clear_from(10); -- 2.11.0