OSDN Git Service

[Refactor] #38997 chg_virtue() に player_type * 引数を追加.
[hengband/hengband.git] / src / spells-status.c
index 0e482ce..8b3e01f 100644 (file)
@@ -123,7 +123,7 @@ bool poly_monster(DIRECTION dir, int power)
        BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
        bool tester = (project_hook(GF_OLD_POLY, dir, power, flg));
        if (tester)
-               chg_virtue(V_CHANCE, 1);
+               chg_virtue(p_ptr, V_CHANCE, 1);
        return(tester);
 }
 
@@ -169,8 +169,8 @@ void stop_singing(player_type *creature_ptr)
        /* The player is singing? */
        if (!SINGING_SONG_EFFECT(creature_ptr)) return;
 
-       /* Hack -- if called from set_action(), avoid recursive loop */
-       if (creature_ptr->action == ACTION_SING) set_action(ACTION_NONE);
+       /* Hack -- if called from set_action(p_ptr), avoid recursive loop */
+       if (creature_ptr->action == ACTION_SING) set_action(p_ptr, ACTION_NONE);
 
        /* Message text of each song or etc. */
        do_spell(REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP);
@@ -269,8 +269,8 @@ bool_hack life_stream(bool_hack message, bool_hack virtue_change)
 {
        if (virtue_change)
        {
-               chg_virtue(V_VITALITY, 1);
-               chg_virtue(V_UNLIFE, -5);
+               chg_virtue(p_ptr, V_VITALITY, 1);
+               chg_virtue(p_ptr, V_UNLIFE, -5);
        }
        if (message)
        {
@@ -426,7 +426,7 @@ bool fishing(player_type *creature_ptr)
                free_turn(creature_ptr);
                return FALSE;
        }
-       set_action(ACTION_FISH);
+       set_action(p_ptr, ACTION_FISH);
        creature_ptr->redraw |= (PR_STATE);
        return TRUE;
 }