• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision453479a9e39cdcdc81fa5c4edbda01d6a8403c7b (tree)
Time2019-08-15 23:16:25
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 do_cmd_inscribe() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -874,7 +874,7 @@ void do_cmd_uninscribe(player_type *creature_ptr)
874874 * Inscribe an object with a comment
875875 * @return なし
876876 */
877-void do_cmd_inscribe(void)
877+void do_cmd_inscribe(player_type *creature_ptr)
878878 {
879879 OBJECT_IDX item;
880880 object_type *o_ptr;
@@ -885,7 +885,7 @@ void do_cmd_inscribe(void)
885885 q = _("どのアイテムに銘を刻みますか? ", "Inscribe which item? ");
886886 s = _("銘を刻めるアイテムがない。", "You have nothing to inscribe.");
887887
888- o_ptr = choose_object(p_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
888+ o_ptr = choose_object(creature_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
889889 if (!o_ptr) return;
890890
891891 /* Describe the activity */
@@ -909,11 +909,11 @@ void do_cmd_inscribe(void)
909909 {
910910 /* Save the inscription */
911911 o_ptr->inscription = quark_add(out_val);
912- p_ptr->update |= (PU_COMBINE);
913- p_ptr->window |= (PW_INVEN | PW_EQUIP);
912+ creature_ptr->update |= (PU_COMBINE);
913+ creature_ptr->window |= (PW_INVEN | PW_EQUIP);
914914
915915 /* .や$の関係で, 再計算が必要なはず -- henkma */
916- p_ptr->update |= (PU_BONUS);
916+ creature_ptr->update |= (PU_BONUS);
917917 }
918918 }
919919
--- a/src/cmd-item.h
+++ b/src/cmd-item.h
@@ -8,7 +8,7 @@ extern void do_cmd_drop(player_type *creature_ptr);
88 extern void do_cmd_destroy(player_type *creature_ptr);
99 extern void do_cmd_observe(player_type *creature_ptr);
1010 extern void do_cmd_uninscribe(player_type *creature_ptr);
11-extern void do_cmd_inscribe(void);
11+extern void do_cmd_inscribe(player_type *creature_ptr);
1212 extern void do_cmd_refill(void);
1313 extern void do_cmd_target(void);
1414 extern void do_cmd_look(void);
--- a/src/core.c
+++ b/src/core.c
@@ -3924,7 +3924,7 @@ static void process_command(void)
39243924 /* Inscribe an object */
39253925 case '{':
39263926 {
3927- do_cmd_inscribe();
3927+ do_cmd_inscribe(p_ptr);
39283928 break;
39293929 }
39303930
--- a/src/store.c
+++ b/src/store.c
@@ -5512,7 +5512,7 @@ static void store_process_command(void)
55125512 /* Inscribe an object */
55135513 case '{':
55145514 {
5515- do_cmd_inscribe();
5515+ do_cmd_inscribe(p_ptr);
55165516 break;
55175517 }
55185518
Show on old repository browser