• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisioncfbd0427af53acae5e9aabae0dd6934b5dadc7ea (tree)
Time2019-06-23 14:55:15
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -1887,7 +1887,7 @@ static void process_world_aux_timeout(void)
18871887 /* Timed sh_fire */
18881888 if (p_ptr->tim_sh_fire)
18891889 {
1890- (void)set_tim_sh_fire(p_ptr->tim_sh_fire - 1, TRUE);
1890+ (void)set_tim_sh_fire(p_ptr, p_ptr->tim_sh_fire - 1, TRUE);
18911891 }
18921892
18931893 /* Timed sh_holy */
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -316,7 +316,7 @@ void dispel_player(void)
316316 (void)set_tim_stealth(p_ptr, 0, TRUE);
317317 (void)set_tim_levitation(p_ptr, 0, TRUE);
318318 (void)set_tim_sh_touki(p_ptr, 0, TRUE);
319- (void)set_tim_sh_fire(0, TRUE);
319+ (void)set_tim_sh_fire(p_ptr, 0, TRUE);
320320 (void)set_tim_sh_holy(0, TRUE);
321321 (void)set_tim_eyeeye(0, TRUE);
322322 (void)set_magicdef(p_ptr, 0, TRUE);
@@ -1837,21 +1837,21 @@ bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
18371837 * @param do_dec 現在の継続時間より長い値のみ上書きする
18381838 * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
18391839 */
1840-bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
1840+bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
18411841 {
18421842 bool notice = FALSE;
18431843 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
18441844
1845- if (p_ptr->is_dead) return FALSE;
1845+ if (creature_ptr->is_dead) return FALSE;
18461846
18471847 /* Open */
18481848 if (v)
18491849 {
1850- if (p_ptr->tim_sh_fire && !do_dec)
1850+ if (creature_ptr->tim_sh_fire && !do_dec)
18511851 {
1852- if (p_ptr->tim_sh_fire > v) return FALSE;
1852+ if (creature_ptr->tim_sh_fire > v) return FALSE;
18531853 }
1854- else if (!p_ptr->tim_sh_fire)
1854+ else if (!creature_ptr->tim_sh_fire)
18551855 {
18561856 msg_print(_("体が炎のオーラで覆われた。", "You have enveloped by fiery aura!"));
18571857 notice = TRUE;
@@ -1861,7 +1861,7 @@ bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
18611861 /* Shut */
18621862 else
18631863 {
1864- if (p_ptr->tim_sh_fire)
1864+ if (creature_ptr->tim_sh_fire)
18651865 {
18661866 msg_print(_("炎のオーラが消えた。", "Fiery aura disappeared."));
18671867 notice = TRUE;
@@ -1869,14 +1869,14 @@ bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
18691869 }
18701870
18711871 /* Use the value */
1872- p_ptr->tim_sh_fire = v;
1873- p_ptr->redraw |= (PR_STATUS);
1872+ creature_ptr->tim_sh_fire = v;
1873+ creature_ptr->redraw |= (PR_STATUS);
18741874
18751875 /* Nothing to notice */
18761876 if (!notice) return (FALSE);
18771877
18781878 if (disturb_state) disturb(FALSE, FALSE);
1879- p_ptr->update |= (PU_BONUS);
1879+ creature_ptr->update |= (PU_BONUS);
18801880 handle_stuff();
18811881 return (TRUE);
18821882 }
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -38,7 +38,7 @@ extern bool set_tim_stealth(player_type *creature_ptr, TIME_EFFECT v, bool do_de
3838 extern bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
3939 extern bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4040 extern bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
41-extern bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec);
41+extern bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4242 extern bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec);
4343 extern bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec);
4444 extern bool set_resist_magic(TIME_EFFECT v, bool do_dec);
--- a/src/realm-daemon.c
+++ b/src/realm-daemon.c
@@ -345,7 +345,7 @@ concptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
345345
346346 set_oppose_fire(dur, FALSE);
347347 set_oppose_cold(dur, FALSE);
348- set_tim_sh_fire(dur, FALSE);
348+ set_tim_sh_fire(p_ptr, dur, FALSE);
349349 set_afraid(p_ptr, 0);
350350 break;
351351 }
Show on old repository browser