OSDN Git Service

[Refactor] #38997 display_snipe_list() に player_type * 引数を追加. / Add player_type ...
authordeskull <deskull@users.sourceforge.jp>
Sun, 1 Sep 2019 12:09:40 +0000 (21:09 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 1 Sep 2019 12:09:40 +0000 (21:09 +0900)
src/snipe.c
src/snipe.h
src/spells3.c

index 3ef0b34..e13bed0 100644 (file)
@@ -163,14 +163,14 @@ int boost_concentration_damage(player_type *creature_ptr, int tdam)
  * @brief スナイパーの技能リストを表示する
  * @return なし
  */
-void display_snipe_list(void)
+void display_snipe_list(player_type *sniper_ptr)
 {
        int i;
        TERM_LEN y = 1;
        TERM_LEN x = 1;
-       PLAYER_LEVEL plev = p_ptr->lev;
-       snipe_power     spell;
-       char            psi_desc[80];
+       PLAYER_LEVEL plev = sniper_ptr->lev;
+       snipe_power spell;
+       char psi_desc[80];
 
        /* Display a list of spells */
        prt("", y, x);
@@ -182,7 +182,7 @@ void display_snipe_list(void)
                /* Access the available spell */
                spell = snipe_powers[i];
                if (spell.min_lev > plev) continue;
-               if (spell.mana_cost > (int)p_ptr->concent) continue;
+               if (spell.mana_cost > (int)sniper_ptr->concent) continue;
 
                sprintf(psi_desc, "  %c) %-30s%2d %4d",
                        I2A(i), spell.name, spell.min_lev, spell.mana_cost);
index 00cbdcd..f44e7ff 100644 (file)
@@ -20,7 +20,7 @@
 
 /* snipe.c */
 extern void reset_concentration(player_type *creature_ptr, bool msg);
-extern void display_snipe_list(void);
+extern void display_snipe_list(player_type *sniper_ptr);
 extern MULTIPLY tot_dam_aux_snipe(player_type *sniper_ptr, MULTIPLY mult, monster_type *m_ptr, SPELL_IDX snipe_type);
 extern void do_cmd_snipe(void);
 extern void do_cmd_snipe_browse(void);
index 5e0c880..8aa4135 100644 (file)
@@ -2225,7 +2225,7 @@ void display_spell_list(void)
 
        if (p_ptr->pclass == CLASS_SNIPER)
        {
-               display_snipe_list();
+               display_snipe_list(p_ptr);
                return;
        }