• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision3de14b2e6c253d8fc18b77e0a97cd4b5faa7ed26 (tree)
Time2019-06-17 00:24:38
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 confirm_leave_level() に player_type * 引数を対象として追加.

Change Summary

Incremental Difference

--- a/src/cmd-basic.c
+++ b/src/cmd-basic.c
@@ -62,12 +62,12 @@
6262 * @param down_stair TRUEならば階段を降りる処理、FALSEなら階段を昇る処理による内容
6363 * @return フロア移動を実際に行うならTRUE、キャンセルする場合はFALSE
6464 */
65-static bool confirm_leave_level(bool down_stair)
65+static bool confirm_leave_level(player_type *creature_ptr, bool down_stair)
6666 {
67- quest_type *q_ptr = &quest[p_ptr->inside_quest];
67+ quest_type *q_ptr = &quest[creature_ptr->inside_quest];
6868
6969 /* Confirm leaving from once only quest */
70- if (confirm_quest && p_ptr->inside_quest &&
70+ if (confirm_quest && creature_ptr->inside_quest &&
7171 (q_ptr->type == QUEST_TYPE_RANDOM ||
7272 (q_ptr->flags & QUEST_FLAG_ONCE &&
7373 q_ptr->status != QUEST_STATUS_COMPLETED) ||
@@ -209,7 +209,7 @@ void do_cmd_go_up(void)
209209 if (have_flag(f_ptr->flags, FF_QUEST))
210210 {
211211 /* Cancel the command */
212- if (!confirm_leave_level(FALSE)) return;
212+ if (!confirm_leave_level(p_ptr, FALSE)) return;
213213
214214
215215 /* Success */
@@ -255,7 +255,7 @@ void do_cmd_go_up(void)
255255 }
256256 else
257257 {
258- go_up = confirm_leave_level(FALSE);
258+ go_up = confirm_leave_level(p_ptr, FALSE);
259259 }
260260
261261 /* Cancel the command */
@@ -358,7 +358,7 @@ void do_cmd_go_down(void)
358358 else if (have_flag(f_ptr->flags, FF_QUEST))
359359 {
360360 /* Confirm Leaving */
361- if(!confirm_leave_level(TRUE)) return;
361+ if(!confirm_leave_level(p_ptr, TRUE)) return;
362362
363363 if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (p_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
364364 msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
Show on old repository browser