OSDN Git Service

[Refactor] #37353 monspell_to_player() の引数順を変更 / Changed the order of arguments in...
authorHourier <hourier@users.sourceforge.jp>
Fri, 14 Feb 2020 16:32:39 +0000 (01:32 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 14 Feb 2020 16:32:39 +0000 (01:32 +0900)
src/monster-spell.h
src/mspells1.c
src/mspells4.c

index 0363620..743f35c 100644 (file)
@@ -327,7 +327,7 @@ extern void set_rf_masks(BIT_FLAGS *f4, BIT_FLAGS *f5, BIT_FLAGS *f6, BIT_FLAGS
 
 /* mspells4.c */
 extern bool spell_learnable(player_type *target_ptr, MONSTER_IDX m_idx);
-extern HIT_POINT monspell_to_player(int SPELL_NUM, player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+extern HIT_POINT monspell_to_player(player_type *target_ptr, int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx);
 extern HIT_POINT monspell_to_monster(player_type *target_ptr, int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
 extern HIT_POINT monspell_damage(player_type *target_ptr, int SPELL_NUM, MONSTER_IDX m_idx, int TYPE);
 extern HIT_POINT monspell_race_damage(player_type *target_ptr, int SPELL_NUM, MONRACE_IDX r_idx, int TYPE);
index b31027e..2aa9e87 100644 (file)
@@ -1744,7 +1744,7 @@ bool make_attack_spell(MONSTER_IDX m_idx, player_type *target_ptr)
        }
 
        /* Cast the spell. */
-       int dam = monspell_to_player(thrown_spell, target_ptr, y, x, m_idx);
+       int dam = monspell_to_player(target_ptr, thrown_spell, y, x, m_idx);
        if (dam < 0) return FALSE;
 
        if ((target_ptr->action == ACTION_LEARN) && thrown_spell > 175)
index a88d515..3577645 100644 (file)
@@ -3619,7 +3619,7 @@ void spell_RF6_S_UNIQUE(player_type *target_ptr, POSITION y, POSITION x, MONSTER
 * @param m_idx 呪文を唱えるモンスターID
 * @return 攻撃呪文のダメージ、または召喚したモンスターの数を返す。その他の場合0。以降の処理を中断するなら-1を返す。
 */
-HIT_POINT monspell_to_player(int SPELL_NUM, player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+HIT_POINT monspell_to_player(player_type *target_ptr, int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx)
 {
        switch (SPELL_NUM)
        {