• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision0475ae472940160b3ca4aed8d0fb1023d761088c (tree)
Time2019-06-24 22:53:26
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -1935,7 +1935,7 @@ static void process_world_aux_timeout(void)
19351935 /* Multi-shadow */
19361936 if (p_ptr->multishadow)
19371937 {
1938- (void)set_multishadow(p_ptr->multishadow - 1, TRUE);
1938+ (void)set_multishadow(p_ptr, p_ptr->multishadow - 1, TRUE);
19391939 }
19401940
19411941 /* Timed Robe of dust */
--- a/src/mind.c
+++ b/src/mind.c
@@ -1440,7 +1440,7 @@ static bool cast_mirror_spell(int spell)
14401440 return recall_player(p_ptr, randint0(21) + 15);
14411441 /* multi-shadow */
14421442 case 18:
1443- set_multishadow(6 + randint1(6), FALSE);
1443+ set_multishadow(p_ptr, 6 + randint1(6), FALSE);
14441444 break;
14451445 /* binding field */
14461446 case 19:
@@ -1749,7 +1749,7 @@ static bool cast_ninja_spell(int spell)
17491749 break;
17501750 }
17511751 case 19:
1752- set_multishadow(6+randint1(6), FALSE);
1752+ set_multishadow(p_ptr, 6+randint1(6), FALSE);
17531753 break;
17541754 default:
17551755 msg_print(_("なに?", "Zap?"));
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -306,7 +306,7 @@ void dispel_player(void)
306306 (void)set_tim_res_time(0, TRUE);
307307 /* by henkma */
308308 (void)set_tim_reflect(p_ptr, 0,TRUE);
309- (void)set_multishadow(0,TRUE);
309+ (void)set_multishadow(p_ptr, 0,TRUE);
310310 (void)set_dustrobe(0,TRUE);
311311
312312 (void)set_tim_invis(p_ptr, 0, TRUE);
@@ -2086,21 +2086,21 @@ bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
20862086 /*
20872087 * Set "p_ptr->multishadow", notice observable changes
20882088 */
2089-bool set_multishadow(TIME_EFFECT v, bool do_dec)
2089+bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
20902090 {
20912091 bool notice = FALSE;
20922092 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
20932093
2094- if (p_ptr->is_dead) return FALSE;
2094+ if (creature_ptr->is_dead) return FALSE;
20952095
20962096 /* Open */
20972097 if (v)
20982098 {
2099- if (p_ptr->multishadow && !do_dec)
2099+ if (creature_ptr->multishadow && !do_dec)
21002100 {
2101- if (p_ptr->multishadow > v) return FALSE;
2101+ if (creature_ptr->multishadow > v) return FALSE;
21022102 }
2103- else if (!p_ptr->multishadow)
2103+ else if (!creature_ptr->multishadow)
21042104 {
21052105 msg_print(_("あなたの周りに幻影が生まれた。", "Your Shadow enveloped you."));
21062106 notice = TRUE;
@@ -2110,7 +2110,7 @@ bool set_multishadow(TIME_EFFECT v, bool do_dec)
21102110 /* Shut */
21112111 else
21122112 {
2113- if (p_ptr->multishadow)
2113+ if (creature_ptr->multishadow)
21142114 {
21152115 msg_print(_("幻影が消えた。", "Your Shadow disappears."));
21162116 notice = TRUE;
@@ -2118,14 +2118,14 @@ bool set_multishadow(TIME_EFFECT v, bool do_dec)
21182118 }
21192119
21202120 /* Use the value */
2121- p_ptr->multishadow = v;
2122- p_ptr->redraw |= (PR_STATUS);
2121+ creature_ptr->multishadow = v;
2122+ creature_ptr->redraw |= (PR_STATUS);
21232123
21242124 /* Nothing to notice */
21252125 if (!notice) return (FALSE);
21262126
21272127 if (disturb_state) disturb(FALSE, FALSE);
2128- p_ptr->update |= (PU_BONUS);
2128+ creature_ptr->update |= (PU_BONUS);
21292129 handle_stuff();
21302130 return (TRUE);
21312131 }
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -43,7 +43,7 @@ extern bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_de
4343 extern bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4444 extern bool set_resist_magic(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4545 extern bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
46-extern bool set_multishadow(TIME_EFFECT v, bool do_dec);
46+extern bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4747 extern bool set_dustrobe(TIME_EFFECT v, bool do_dec);
4848 extern bool set_kabenuke(TIME_EFFECT v, bool do_dec);
4949 extern bool set_tsuyoshi(TIME_EFFECT v, bool do_dec);
Show on old repository browser