変愚蛮怒のメインリポジトリです
Revision | 1429cfd78eeb2ceed7133c423b7ad0a20fc1cc80 (tree) |
---|---|
Zeit | 2019-10-05 00:57:28 |
Autor | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #38997 pattern_teleport() に player_type * 引数を追加. / Add player_type * argument to pattern_teleport().
@@ -609,7 +609,7 @@ static void sense_inventory2(player_type *creature_ptr) | ||
609 | 609 | * @brief パターン終点到達時のテレポート処理を行う |
610 | 610 | * @return なし |
611 | 611 | */ |
612 | -static void pattern_teleport(void) | |
612 | +static void pattern_teleport(player_type *creature_ptr) | |
613 | 613 | { |
614 | 614 | DEPTH min_level = 0; |
615 | 615 | DEPTH max_level = 99; |
@@ -622,27 +622,27 @@ static void pattern_teleport(void) | ||
622 | 622 | |
623 | 623 | /* Only downward in ironman mode */ |
624 | 624 | if (ironman_downward) |
625 | - min_level = p_ptr->current_floor_ptr->dun_level; | |
625 | + min_level = creature_ptr->current_floor_ptr->dun_level; | |
626 | 626 | |
627 | 627 | /* Maximum level */ |
628 | - if (p_ptr->dungeon_idx == DUNGEON_ANGBAND) | |
628 | + if (creature_ptr->dungeon_idx == DUNGEON_ANGBAND) | |
629 | 629 | { |
630 | - if (p_ptr->current_floor_ptr->dun_level > 100) | |
630 | + if (creature_ptr->current_floor_ptr->dun_level > 100) | |
631 | 631 | max_level = MAX_DEPTH - 1; |
632 | - else if (p_ptr->current_floor_ptr->dun_level == 100) | |
632 | + else if (creature_ptr->current_floor_ptr->dun_level == 100) | |
633 | 633 | max_level = 100; |
634 | 634 | } |
635 | 635 | else |
636 | 636 | { |
637 | - max_level = d_info[p_ptr->dungeon_idx].maxdepth; | |
638 | - min_level = d_info[p_ptr->dungeon_idx].mindepth; | |
637 | + max_level = d_info[creature_ptr->dungeon_idx].maxdepth; | |
638 | + min_level = d_info[creature_ptr->dungeon_idx].mindepth; | |
639 | 639 | } |
640 | 640 | |
641 | 641 | /* Prompt */ |
642 | 642 | sprintf(ppp, _("テレポート先:(%d-%d)", "Teleport to level (%d-%d): "), (int)min_level, (int)max_level); |
643 | 643 | |
644 | 644 | /* Default */ |
645 | - sprintf(tmp_val, "%d", (int)p_ptr->current_floor_ptr->dun_level); | |
645 | + sprintf(tmp_val, "%d", (int)creature_ptr->current_floor_ptr->dun_level); | |
646 | 646 | |
647 | 647 | /* Ask for a level */ |
648 | 648 | if (!get_string(ppp, tmp_val, 10)) return; |
@@ -668,21 +668,21 @@ static void pattern_teleport(void) | ||
668 | 668 | if (autosave_l) do_cmd_save_game(TRUE); |
669 | 669 | |
670 | 670 | /* Change level */ |
671 | - p_ptr->current_floor_ptr->dun_level = command_arg; | |
671 | + creature_ptr->current_floor_ptr->dun_level = command_arg; | |
672 | 672 | |
673 | 673 | leave_quest_check(); |
674 | 674 | |
675 | - if (record_stair) exe_write_diary(p_ptr, NIKKI_PAT_TELE, 0, NULL); | |
675 | + if (record_stair) exe_write_diary(creature_ptr, NIKKI_PAT_TELE, 0, NULL); | |
676 | 676 | |
677 | - p_ptr->inside_quest = 0; | |
678 | - free_turn(p_ptr); | |
677 | + creature_ptr->inside_quest = 0; | |
678 | + free_turn(creature_ptr); | |
679 | 679 | |
680 | 680 | /* |
681 | 681 | * Clear all saved floors |
682 | 682 | * and create a first saved floor |
683 | 683 | */ |
684 | 684 | prepare_change_floor_mode(CFM_FIRST_FLOOR); |
685 | - p_ptr->leaving = TRUE; | |
685 | + creature_ptr->leaving = TRUE; | |
686 | 686 | } |
687 | 687 | |
688 | 688 | /*! |
@@ -727,7 +727,7 @@ static bool pattern_effect(player_type *creature_ptr) | ||
727 | 727 | break; |
728 | 728 | |
729 | 729 | case PATTERN_TILE_TELEPORT: |
730 | - pattern_teleport(); | |
730 | + pattern_teleport(creature_ptr); | |
731 | 731 | break; |
732 | 732 | |
733 | 733 | case PATTERN_TILE_WRECKED: |