• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionc86d268b6dd876fa574891b4065e222fd56abb86 (tree)
Time2019-06-17 00:16:20
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 do_cmd_activate() に player_type * 引数を使用者として追加.

Change Summary

Incremental Difference

--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -630,15 +630,15 @@ void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
630630 * @brief 装備を発動するコマンドのメインルーチン /
631631 * @return なし
632632 */
633-void do_cmd_activate(void)
633+void do_cmd_activate(player_type *user_ptr)
634634 {
635635 OBJECT_IDX item;
636636 concptr q, s;
637637
638- if (p_ptr->wild_mode) return;
639- if (cmd_limit_arena(p_ptr)) return;
638+ if (user_ptr->wild_mode) return;
639+ if (cmd_limit_arena(user_ptr)) return;
640640
641- if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
641+ if (user_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
642642 {
643643 set_action(ACTION_NONE);
644644 }
@@ -651,7 +651,7 @@ void do_cmd_activate(void)
651651 if (!choose_object(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT), 0)) return;
652652
653653 /* Activate the item */
654- exe_activate(p_ptr, item);
654+ exe_activate(user_ptr, item);
655655 }
656656
657657 /*!
--- a/src/cmd-activate.h
+++ b/src/cmd-activate.h
@@ -1,6 +1,6 @@
11 #pragma once
22
3-extern void do_cmd_activate(void);
3+extern void do_cmd_activate(player_type *user_ptr);
44 extern void exe_activate(player_type *user_ptr, INVENTORY_IDX item);
55 extern bool activate_artifact(object_type * o_ptr);
66
--- a/src/core.c
+++ b/src/core.c
@@ -3965,7 +3965,7 @@ static void process_command(void)
39653965 /* Activate an artifact */
39663966 case 'A':
39673967 {
3968- do_cmd_activate();
3968+ do_cmd_activate(p_ptr);
39693969 break;
39703970 }
39713971
Show on old repository browser