OSDN Git Service

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

index 5b24cd3..57ef3cb 100644 (file)
@@ -837,7 +837,7 @@ void do_cmd_observe(player_type *creature_ptr)
  * Remove the inscription from an object XXX Mention item (when done)?
  * @return なし
  */
-void do_cmd_uninscribe(void)
+void do_cmd_uninscribe(player_type *creature_ptr)
 {
        OBJECT_IDX item;
        object_type *o_ptr;
@@ -846,7 +846,7 @@ void do_cmd_uninscribe(void)
        q = _("どのアイテムの銘を消しますか? ", "Un-inscribe which item? ");
        s = _("銘を消せるアイテムがない。", "You have nothing to un-inscribe.");
 
-       o_ptr = choose_object(p_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
+       o_ptr = choose_object(creature_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
        if (!o_ptr) return;
 
        /* Nothing to remove */
@@ -860,11 +860,11 @@ void do_cmd_uninscribe(void)
 
        /* Remove the incription */
        o_ptr->inscription = 0;
-       p_ptr->update |= (PU_COMBINE);
-       p_ptr->window |= (PW_INVEN | PW_EQUIP);
+       creature_ptr->update |= (PU_COMBINE);
+       creature_ptr->window |= (PW_INVEN | PW_EQUIP);
 
        /* .や$の関係で, 再計算が必要なはず -- henkma */
-       p_ptr->update |= (PU_BONUS);
+       creature_ptr->update |= (PU_BONUS);
 
 }
 
index 8724e6a..523fbf4 100644 (file)
@@ -7,7 +7,7 @@ extern void do_cmd_takeoff(player_type *creature_ptr);
 extern void do_cmd_drop(player_type *creature_ptr);
 extern void do_cmd_destroy(player_type *creature_ptr);
 extern void do_cmd_observe(player_type *creature_ptr);
-extern void do_cmd_uninscribe(void);
+extern void do_cmd_uninscribe(player_type *creature_ptr);
 extern void do_cmd_inscribe(void);
 extern void do_cmd_refill(void);
 extern void do_cmd_target(void);
index 91bfdac..60a4d2e 100644 (file)
@@ -3931,7 +3931,7 @@ static void process_command(void)
                /* Uninscribe an object */
                case '}':
                {
-                       do_cmd_uninscribe();
+                       do_cmd_uninscribe(p_ptr);
                        break;
                }
 
index 0ae2c28..2fb52aa 100644 (file)
@@ -5519,7 +5519,7 @@ static void store_process_command(void)
                /* Uninscribe an object */
                case '}':
                {
-                       do_cmd_uninscribe();
+                       do_cmd_uninscribe(p_ptr);
                        break;
                }