OSDN Git Service

[Refactor] #38997 bolt() にplayer_type * 引数を追加 / Added player_type * argument to bolt()
[hengband/hengband.git] / src / mspells1.c
index 847de16..976b662 100644 (file)
@@ -535,7 +535,7 @@ bool clean_shot(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2,
  * @param target_type モンスターからモンスターへ撃つならMONSTER_TO_MONSTER、モンスターからプレイヤーならMONSTER_TO_PLAYER
  * @return なし
  */
-void bolt(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type)
+void bolt(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type)
   {
     BIT_FLAGS flg = 0;
     bool learnable = spell_learnable(m_idx);
@@ -552,7 +552,7 @@ void bolt(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp,
        if (typ != GF_ARROW) flg  |= PROJECT_REFLECTABLE;
 
        /* Target the player with a bolt attack */
-       (void)project(p_ptr, m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
+       (void)project(target_ptr, m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
 }