OSDN Git Service

[Refactor] #38997 do_cmd_equip() に player_type * 引数を追加.
authordeskull <deskull@users.sourceforge.jp>
Wed, 14 Aug 2019 15:08:14 +0000 (00:08 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 14 Aug 2019 15:08:14 +0000 (00:08 +0900)
src/cmd-item.c
src/cmd-item.h
src/core.c
src/store.c

index 773aaf7..b27de79 100644 (file)
@@ -94,7 +94,7 @@ void do_cmd_inven(void)
  * @brief 装備一覧を表示するコマンドのメインルーチン / Display equipment
  * @return なし 
  */
-void do_cmd_equip(void)
+void do_cmd_equip(player_type *creature_ptr)
 {
        char out_val[160];
        command_wrk = TRUE;
@@ -105,12 +105,12 @@ void do_cmd_equip(void)
 
 #ifdef JP
        sprintf(out_val, "装備: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
-           (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
-           (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
+           (int)lbtokg1(creature_ptr->total_weight) , (int)lbtokg2(creature_ptr->total_weight) ,
+           (long int)((creature_ptr->total_weight * 100) / weight_limit(creature_ptr)));
 #else
        sprintf(out_val, "Equipment: carrying %d.%d pounds (%ld%% of capacity). Command: ",
-           (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
-           (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
+           (int)(creature_ptr->total_weight / 10), (int)(creature_ptr->total_weight % 10),
+           (long int)((creature_ptr->total_weight * 100) / weight_limit(creature_ptr)));
 #endif
 
        prt(out_val, 0, 0);
index 8d5dbe2..852e095 100644 (file)
@@ -1,7 +1,7 @@
 /* cmd3-item.h */
 
 extern void do_cmd_inven(void);
-extern void do_cmd_equip(void);
+extern void do_cmd_equip(player_type *creature_ptr);
 extern void do_cmd_wield(player_type *creature_ptr);
 extern void do_cmd_takeoff(player_type *creature_ptr);
 extern void do_cmd_drop(void);
index 00cd2cd..9e62d02 100644 (file)
@@ -3613,7 +3613,7 @@ static void process_command(void)
                /* Equipment list */
                case 'e':
                {
-                       do_cmd_equip();
+                       do_cmd_equip(p_ptr);
                        break;
                }
 
index ad20364..416e1d2 100644 (file)
@@ -5462,7 +5462,7 @@ static void store_process_command(void)
                /* Equipment list */
                case 'e':
                {
-                       do_cmd_equip();
+                       do_cmd_equip(p_ptr);
                        break;
                }