• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision2ffba46fd93d078f8cf5106a72fd8bb968285dde (tree)
Time2019-08-15 00:13:46
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -558,7 +558,7 @@ void do_cmd_takeoff(player_type *creature_ptr)
558558 * @brief アイテムを落とすコマンドのメインルーチン / Drop an item
559559 * @return なし
560560 */
561-void do_cmd_drop(void)
561+void do_cmd_drop(player_type *creature_ptr)
562562 {
563563 OBJECT_IDX item;
564564 int amt = 1;
@@ -567,9 +567,9 @@ void do_cmd_drop(void)
567567
568568 concptr q, s;
569569
570- if (p_ptr->special_defense & KATA_MUSOU)
570+ if (creature_ptr->special_defense & KATA_MUSOU)
571571 {
572- set_action(p_ptr, ACTION_NONE);
572+ set_action(creature_ptr, ACTION_NONE);
573573 }
574574
575575 q = _("どのアイテムを落としますか? ", "Drop which item? ");
@@ -591,7 +591,7 @@ void do_cmd_drop(void)
591591 if (amt <= 0) return;
592592 }
593593
594- take_turn(p_ptr, 50);
594+ take_turn(creature_ptr, 50);
595595
596596 /* Drop (some of) the item */
597597 inven_drop(item, amt);
@@ -599,10 +599,10 @@ void do_cmd_drop(void)
599599 if (item >= INVEN_RARM)
600600 {
601601 verify_equip_slot(item);
602- calc_android_exp(p_ptr);
602+ calc_android_exp(creature_ptr);
603603 }
604604
605- p_ptr->redraw |= (PR_EQUIPPY);
605+ creature_ptr->redraw |= (PR_EQUIPPY);
606606 }
607607
608608
--- a/src/cmd-item.h
+++ b/src/cmd-item.h
@@ -4,7 +4,7 @@ extern void do_cmd_inven(player_type *creature_ptr);
44 extern void do_cmd_equip(player_type *creature_ptr);
55 extern void do_cmd_wield(player_type *creature_ptr);
66 extern void do_cmd_takeoff(player_type *creature_ptr);
7-extern void do_cmd_drop(void);
7+extern void do_cmd_drop(player_type *creature_ptr);
88 extern void do_cmd_destroy(void);
99 extern void do_cmd_observe(void);
1010 extern void do_cmd_uninscribe(void);
--- a/src/core.c
+++ b/src/core.c
@@ -3599,7 +3599,7 @@ static void process_command(void)
35993599 /* Drop an item */
36003600 case 'd':
36013601 {
3602- if (!p_ptr->wild_mode) do_cmd_drop();
3602+ if (!p_ptr->wild_mode) do_cmd_drop(p_ptr);
36033603 break;
36043604 }
36053605
Show on old repository browser