• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision92394e9c4bff984a9940e8adb070845ddda925ae (tree)
Time2019-08-15 00:01:25
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -496,15 +496,15 @@ void kamaenaoshi(INVENTORY_IDX item)
496496 * @brief 装備を外すコマンドのメインルーチン / Take off an item
497497 * @return なし
498498 */
499-void do_cmd_takeoff(void)
499+void do_cmd_takeoff(player_type *creature_ptr)
500500 {
501501 OBJECT_IDX item;
502502 object_type *o_ptr;
503503 concptr q, s;
504504
505- if (p_ptr->special_defense & KATA_MUSOU)
505+ if (creature_ptr->special_defense & KATA_MUSOU)
506506 {
507- set_action(p_ptr, ACTION_NONE);
507+ set_action(creature_ptr, ACTION_NONE);
508508 }
509509
510510 q = _("どれを装備からはずしますか? ", "Take off which item? ");
@@ -516,7 +516,7 @@ void do_cmd_takeoff(void)
516516 /* Item is cursed */
517517 if (object_is_cursed(o_ptr))
518518 {
519- if ((o_ptr->curse_flags & TRC_PERMA_CURSE) || (p_ptr->pclass != CLASS_BERSERKER))
519+ if ((o_ptr->curse_flags & TRC_PERMA_CURSE) || (creature_ptr->pclass != CLASS_BERSERKER))
520520 {
521521 msg_print(_("ふーむ、どうやら呪われているようだ。", "Hmmm, it seems to be cursed."));
522522
@@ -531,26 +531,26 @@ void do_cmd_takeoff(void)
531531 o_ptr->curse_flags = 0L;
532532 o_ptr->feeling = FEEL_NONE;
533533
534- p_ptr->update |= (PU_BONUS);
535- p_ptr->window |= (PW_EQUIP);
534+ creature_ptr->update |= (PU_BONUS);
535+ creature_ptr->window |= (PW_EQUIP);
536536
537537 msg_print(_("呪いを打ち破った。", "You break the curse."));
538538 }
539539 else
540540 {
541541 msg_print(_("装備を外せなかった。", "You couldn't remove the equipment."));
542- take_turn(p_ptr, 50);
542+ take_turn(creature_ptr, 50);
543543 return;
544544 }
545545 }
546546
547- take_turn(p_ptr, 50);
547+ take_turn(creature_ptr, 50);
548548
549549 /* Take off the item */
550550 (void)inven_takeoff(item, 255);
551551 kamaenaoshi(item);
552- calc_android_exp(p_ptr);
553- p_ptr->redraw |= (PR_EQUIPPY);
552+ calc_android_exp(creature_ptr);
553+ creature_ptr->redraw |= (PR_EQUIPPY);
554554 }
555555
556556
--- a/src/cmd-item.h
+++ b/src/cmd-item.h
@@ -3,7 +3,7 @@
33 extern void do_cmd_inven(void);
44 extern void do_cmd_equip(void);
55 extern void do_cmd_wield(player_type *creature_ptr);
6-extern void do_cmd_takeoff(void);
6+extern void do_cmd_takeoff(player_type *creature_ptr);
77 extern void do_cmd_drop(void);
88 extern void do_cmd_destroy(void);
99 extern void do_cmd_observe(void);
--- a/src/core.c
+++ b/src/core.c
@@ -3592,7 +3592,7 @@ static void process_command(void)
35923592 /* Take off equipment */
35933593 case 't':
35943594 {
3595- if (!p_ptr->wild_mode) do_cmd_takeoff();
3595+ if (!p_ptr->wild_mode) do_cmd_takeoff(p_ptr);
35963596 break;
35973597 }
35983598
--- a/src/store.c
+++ b/src/store.c
@@ -5448,7 +5448,7 @@ static void store_process_command(void)
54485448 /* Take off equipment */
54495449 case 't':
54505450 {
5451- do_cmd_takeoff();
5451+ do_cmd_takeoff(p_ptr);
54525452 break;
54535453 }
54545454
Show on old repository browser