OSDN Git Service

[Refactor] #38997 hit_trap_set_abnormal_status_p()にplayer_type * 引数を追加 / Added player...
authorHourier <hourier@users.sourceforge.jp>
Sat, 18 Jan 2020 12:18:28 +0000 (21:18 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sat, 18 Jan 2020 14:01:53 +0000 (23:01 +0900)
src/trap.c

index 6a4b7b1..b34a130 100644 (file)
@@ -392,12 +392,12 @@ static void hit_trap_set_abnormal_status(concptr trap_message, bool resist, bool
        }
 }
 
-static void hit_trap_set_abnormal_status_p(concptr trap_message, bool resist, bool(*set_status)(player_type *, IDX), IDX turn_aux)
+static void hit_trap_set_abnormal_status_p(player_type *trapped_ptr, concptr trap_message, bool resist, bool(*set_status)(player_type *, IDX), IDX turn_aux)
 {
        msg_print(trap_message);
        if (!resist)
        {
-               set_status(p_ptr, turn_aux);
+               set_status(trapped_ptr, turn_aux);
        }
 }
 
@@ -534,7 +534,7 @@ void hit_trap(player_type *trapped_ptr, bool break_trap)
 
        case TRAP_BLIND:
        {
-               hit_trap_set_abnormal_status_p(
+               hit_trap_set_abnormal_status_p(trapped_ptr,
                        _("黒いガスに包み込まれた!", "A black gas surrounds you!"),
                        trapped_ptr->resist_blind,
                        set_blind, trapped_ptr->blind + (TIME_EFFECT)randint0(50) + 25);
@@ -543,7 +543,7 @@ void hit_trap(player_type *trapped_ptr, bool break_trap)
 
        case TRAP_CONFUSE:
        {
-               hit_trap_set_abnormal_status_p(
+               hit_trap_set_abnormal_status_p(trapped_ptr,
                        _("きらめくガスに包み込まれた!", "A gas of scintillating colors surrounds you!"),
                        trapped_ptr->resist_conf,
                        set_confused, trapped_ptr->confused + (TIME_EFFECT)randint0(20) + 10);
@@ -552,7 +552,7 @@ void hit_trap(player_type *trapped_ptr, bool break_trap)
 
        case TRAP_POISON:
        {
-               hit_trap_set_abnormal_status_p(
+               hit_trap_set_abnormal_status_p(trapped_ptr,
                        _("刺激的な緑色のガスに包み込まれた!", "A pungent green gas surrounds you!"),
                        trapped_ptr->resist_pois || is_oppose_pois(trapped_ptr),
                        set_poisoned, trapped_ptr->poisoned + (TIME_EFFECT)randint0(20) + 10);