From: deskull Date: Sat, 6 Jul 2019 02:23:30 +0000 (+0900) Subject: [Refactor] #38997 init_dungeon_quests() に player_type * 引数を追加. X-Git-Tag: vmacos3.0.0-alpha52~2968 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e7ac4b13d632578aaea5a062b59a92040f6f3d45;p=hengbandforosx%2Fhengbandosx.git [Refactor] #38997 init_dungeon_quests() に player_type * 引数を追加. --- diff --git a/src/birth.c b/src/birth.c index 3250ab3bd..747b6164e 100644 --- a/src/birth.c +++ b/src/birth.c @@ -1876,18 +1876,18 @@ static void player_wipe_without_name(player_type *creature_ptr) * @brief ダンジョン内部のクエストを初期化する / Initialize random quests and final quests * @return なし */ -static void init_dungeon_quests(void) +static void init_dungeon_quests(player_type *creature_ptr) { int number_of_quests = MAX_RANDOM_QUEST - MIN_RANDOM_QUEST + 1; int i; /* Init the random quests */ init_flags = INIT_ASSIGN; - p_ptr->inside_quest = MIN_RANDOM_QUEST; + creature_ptr->inside_quest = MIN_RANDOM_QUEST; process_dungeon_file("q_info.txt", 0, 0, 0, 0); - p_ptr->inside_quest = 0; + creature_ptr->inside_quest = 0; /* Generate quests */ for (i = MIN_RANDOM_QUEST + number_of_quests - 1; i >= MIN_RANDOM_QUEST; i--) @@ -1907,18 +1907,18 @@ static void init_dungeon_quests(void) /* Init the two main quests (Oberon + Serpent) */ init_flags = INIT_ASSIGN; - p_ptr->inside_quest = QUEST_OBERON; + creature_ptr->inside_quest = QUEST_OBERON; process_dungeon_file("q_info.txt", 0, 0, 0, 0); quest[QUEST_OBERON].status = QUEST_STATUS_TAKEN; - p_ptr->inside_quest = QUEST_SERPENT; + creature_ptr->inside_quest = QUEST_SERPENT; process_dungeon_file("q_info.txt", 0, 0, 0, 0); quest[QUEST_SERPENT].status = QUEST_STATUS_TAKEN; - p_ptr->inside_quest = 0; + creature_ptr->inside_quest = 0; } /*! @@ -4487,7 +4487,7 @@ static bool player_birth_aux(player_type *creature_ptr) /* Initialize random quests */ - init_dungeon_quests(); + init_dungeon_quests(p_ptr); /* Save character data for quick start */ save_prev_data(creature_ptr, &previous_char); @@ -4543,7 +4543,7 @@ static bool ask_quick_start(player_type *creature_ptr) load_prev_data(creature_ptr, FALSE); init_turn(); - init_dungeon_quests(); + init_dungeon_quests(creature_ptr); sp_ptr = &sex_info[creature_ptr->psex]; rp_ptr = &race_info[creature_ptr->prace];