• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision4e3a2b80d56f983dbef74c15f066b0590def1dc0 (tree)
Time2019-06-23 15:07:07
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -1899,7 +1899,7 @@ static void process_world_aux_timeout(void)
18991899 /* Timed eyeeye */
19001900 if (p_ptr->tim_eyeeye)
19011901 {
1902- (void)set_tim_eyeeye(p_ptr->tim_eyeeye - 1, TRUE);
1902+ (void)set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye - 1, TRUE);
19031903 }
19041904
19051905 /* Timed resist-magic */
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -4064,7 +4064,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
40644064 msg_format("The attack of %s has wounded %s!", m_name, m_name_self);
40654065 #endif
40664066 project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
4067- if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
4067+ if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye-5, TRUE);
40684068 }
40694069
40704070 if ((p_ptr->counter || (p_ptr->special_defense & KATA_MUSOU)) && alive && !p_ptr->is_dead && m_ptr->ml && (p_ptr->csp > 7))
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -2109,7 +2109,7 @@ HIT_POINT spell_RF6_SPECIAL_B(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER
21092109 msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), m_name, m_name_self);
21102110
21112111 project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
2112- set_tim_eyeeye(p_ptr->tim_eyeeye - 5, TRUE);
2112+ set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye - 5, TRUE);
21132113 }
21142114 }
21152115
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -318,7 +318,7 @@ void dispel_player(void)
318318 (void)set_tim_sh_touki(p_ptr, 0, TRUE);
319319 (void)set_tim_sh_fire(p_ptr, 0, TRUE);
320320 (void)set_tim_sh_holy(p_ptr, 0, TRUE);
321- (void)set_tim_eyeeye(0, TRUE);
321+ (void)set_tim_eyeeye(p_ptr, 0, TRUE);
322322 (void)set_magicdef(p_ptr, 0, TRUE);
323323 (void)set_resist_magic(0, TRUE);
324324 (void)set_oppose_acid(0, TRUE);
@@ -1937,21 +1937,21 @@ bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
19371937 * @param do_dec 現在の継続時間より長い値のみ上書きする
19381938 * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
19391939 */
1940-bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
1940+bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
19411941 {
19421942 bool notice = FALSE;
19431943 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
19441944
1945- if (p_ptr->is_dead) return FALSE;
1945+ if (creature_ptr->is_dead) return FALSE;
19461946
19471947 /* Open */
19481948 if (v)
19491949 {
1950- if (p_ptr->tim_eyeeye && !do_dec)
1950+ if (creature_ptr->tim_eyeeye && !do_dec)
19511951 {
1952- if (p_ptr->tim_eyeeye > v) return FALSE;
1952+ if (creature_ptr->tim_eyeeye > v) return FALSE;
19531953 }
1954- else if (!p_ptr->tim_eyeeye)
1954+ else if (!creature_ptr->tim_eyeeye)
19551955 {
19561956 msg_print(_("法の守り手になった気がした!", "You feel like a keeper of commandments!"));
19571957 notice = TRUE;
@@ -1961,7 +1961,7 @@ bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
19611961 /* Shut */
19621962 else
19631963 {
1964- if (p_ptr->tim_eyeeye)
1964+ if (creature_ptr->tim_eyeeye)
19651965 {
19661966 msg_print(_("懲罰を執行することができなくなった。", "You no longer feel like a keeper."));
19671967 notice = TRUE;
@@ -1969,14 +1969,14 @@ bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
19691969 }
19701970
19711971 /* Use the value */
1972- p_ptr->tim_eyeeye = v;
1973- p_ptr->redraw |= (PR_STATUS);
1972+ creature_ptr->tim_eyeeye = v;
1973+ creature_ptr->redraw |= (PR_STATUS);
19741974
19751975 /* Nothing to notice */
19761976 if (!notice) return (FALSE);
19771977
19781978 if (disturb_state) disturb(FALSE, FALSE);
1979- p_ptr->update |= (PU_BONUS);
1979+ creature_ptr->update |= (PU_BONUS);
19801980 handle_stuff();
19811981 return (TRUE);
19821982 }
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -40,7 +40,7 @@ extern bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do
4040 extern bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4141 extern bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4242 extern bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
43-extern bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec);
43+extern bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
4444 extern bool set_resist_magic(TIME_EFFECT v, bool do_dec);
4545 extern bool set_tim_reflect(TIME_EFFECT v, bool do_dec);
4646 extern bool set_multishadow(TIME_EFFECT v, bool do_dec);
--- a/src/realm-crusade.c
+++ b/src/realm-crusade.c
@@ -488,7 +488,7 @@ concptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
488488
489489 if (cast)
490490 {
491- set_tim_eyeeye(randint1(base) + base, FALSE);
491+ set_tim_eyeeye(p_ptr, randint1(base) + base, FALSE);
492492 }
493493 }
494494 break;
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -5062,7 +5062,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
50625062
50635063 msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), m_name, m_name_self);
50645064 project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
5065- if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
5065+ if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye-5, TRUE);
50665066 }
50675067
50685068 if (p_ptr->riding && dam > 0)
Show on old repository browser