• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionf44623d7f2756a257fe6a42cdc6ae092fd9b5083 (tree)
Time2019-06-24 23:00:43
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -1941,7 +1941,7 @@ static void process_world_aux_timeout(void)
19411941 /* Timed Robe of dust */
19421942 if (p_ptr->dustrobe)
19431943 {
1944- (void)set_dustrobe(p_ptr->dustrobe - 1, TRUE);
1944+ (void)set_dustrobe(p_ptr, p_ptr->dustrobe - 1, TRUE);
19451945 }
19461946
19471947 /* Timed infra-vision */
--- a/src/mind.c
+++ b/src/mind.c
@@ -1368,7 +1368,7 @@ static bool cast_mirror_spell(int spell)
13681368 break;
13691369 /* robe of dust */
13701370 case 6:
1371- set_dustrobe(20 + randint1(20), FALSE);
1371+ set_dustrobe(p_ptr, 20 + randint1(20), FALSE);
13721372 break;
13731373 /* banishing mirror */
13741374 case 7:
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -307,7 +307,7 @@ void dispel_player(void)
307307 /* by henkma */
308308 (void)set_tim_reflect(p_ptr, 0,TRUE);
309309 (void)set_multishadow(p_ptr, 0,TRUE);
310- (void)set_dustrobe(0,TRUE);
310+ (void)set_dustrobe(p_ptr, 0,TRUE);
311311
312312 (void)set_tim_invis(p_ptr, 0, TRUE);
313313 (void)set_tim_infra(p_ptr, 0, TRUE);
@@ -2136,21 +2136,21 @@ bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
21362136 * @param do_dec 現在の継続時間より長い値のみ上書きする
21372137 * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
21382138 */
2139-bool set_dustrobe(TIME_EFFECT v, bool do_dec)
2139+bool set_dustrobe(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
21402140 {
21412141 bool notice = FALSE;
21422142 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
21432143
2144- if (p_ptr->is_dead) return FALSE;
2144+ if (creature_ptr->is_dead) return FALSE;
21452145
21462146 /* Open */
21472147 if (v)
21482148 {
2149- if (p_ptr->dustrobe && !do_dec)
2149+ if (creature_ptr->dustrobe && !do_dec)
21502150 {
2151- if (p_ptr->dustrobe > v) return FALSE;
2151+ if (creature_ptr->dustrobe > v) return FALSE;
21522152 }
2153- else if (!p_ptr->dustrobe)
2153+ else if (!creature_ptr->dustrobe)
21542154 {
21552155 msg_print(_("体が鏡のオーラで覆われた。", "You were enveloped by mirror shards."));
21562156 notice = TRUE;
@@ -2160,7 +2160,7 @@ bool set_dustrobe(TIME_EFFECT v, bool do_dec)
21602160 /* Shut */
21612161 else
21622162 {
2163- if (p_ptr->dustrobe)
2163+ if (creature_ptr->dustrobe)
21642164 {
21652165 msg_print(_("鏡のオーラが消えた。", "The mirror shards disappear."));
21662166 notice = TRUE;
@@ -2168,14 +2168,14 @@ bool set_dustrobe(TIME_EFFECT v, bool do_dec)
21682168 }
21692169
21702170 /* Use the value */
2171- p_ptr->dustrobe = v;
2172- p_ptr->redraw |= (PR_STATUS);
2171+ creature_ptr->dustrobe = v;
2172+ creature_ptr->redraw |= (PR_STATUS);
21732173
21742174 /* Nothing to notice */
21752175 if (!notice) return (FALSE);
21762176
21772177 if (disturb_state) disturb(FALSE, FALSE);
2178- p_ptr->update |= (PU_BONUS);
2178+ creature_ptr->update |= (PU_BONUS);
21792179 handle_stuff();
21802180 return (TRUE);
21812181 }
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -44,7 +44,7 @@ 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);
4646 extern bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
47-extern bool set_dustrobe(TIME_EFFECT v, bool do_dec);
47+extern bool set_dustrobe(player_type *creature_ptr, 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);
5050 extern bool set_ele_attack(u32b attack_type, TIME_EFFECT v);
Show on old repository browser