OSDN Git Service

[Refactor] #38997 restore_all_status() に player_type * 引数を追加. / Add player_type ...
authordeskull <deskull@users.sourceforge.jp>
Sun, 6 Oct 2019 10:26:52 +0000 (19:26 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 6 Oct 2019 10:26:52 +0000 (19:26 +0900)
src/bldg.c
src/cmd/cmd-activate.c
src/cmd/cmd-eat.c
src/cmd/cmd-zaprod.c
src/core.c
src/patron.c
src/racial.c
src/realm-life.c
src/realm-song.c
src/spells-status.c
src/spells-status.h

index cdd525f..0427e3b 100644 (file)
@@ -3972,7 +3972,7 @@ static void bldg_process_command(building_type *bldg, int i)
                paid = cure_critical_wounds(p_ptr, 200);
                break;
        case BACT_RESTORE: /* needs work */
-               paid = restore_all_status();
+               paid = restore_all_status(p_ptr);
                break;
        case BACT_ENCHANT_ARROWS:
                item_tester_hook = item_tester_hook_ammo;
index b7e1bf8..4db2469 100644 (file)
@@ -1267,7 +1267,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_REST_ALL:
        {
                msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
-               (void)restore_all_status();
+               (void)restore_all_status(user_ptr);
                (void)restore_level(user_ptr);
                break;
        }
index f6f585d..0fdf28c 100644 (file)
@@ -220,7 +220,7 @@ void exe_eat_food(player_type *creature_ptr, INVENTORY_IDX item)
 
                case SV_FOOD_RESTORING:
                {
-                       ident = restore_all_status();
+                       ident = restore_all_status(creature_ptr);
                        break;
                }
 
index 465f09d..c9d2a07 100644 (file)
@@ -113,7 +113,7 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d
        case SV_ROD_RESTORATION:
        {
                if(restore_level(creature_ptr)) ident = TRUE;
-               if(restore_all_status()) ident = TRUE;
+               if(restore_all_status(creature_ptr)) ident = TRUE;
                break;
        }
 
index 872843d..cfaca93 100644 (file)
@@ -707,7 +707,7 @@ static bool pattern_effect(player_type *creature_ptr)
        {
        case PATTERN_TILE_END:
                (void)set_image(creature_ptr, 0);
-               (void)restore_all_status();
+               (void)restore_all_status(creature_ptr);
                (void)restore_level(creature_ptr);
                (void)cure_critical_wounds(creature_ptr, 1000);
 
index aef130a..35bea28 100644 (file)
@@ -484,7 +484,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
 
                        msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[creature_ptr->chaos_patron]);
                        (void)restore_level(creature_ptr);
-                       (void)restore_all_status();
+                       (void)restore_all_status(creature_ptr);
                        (void)true_healing(creature_ptr, 5000);
                        reward = _("体力が回復した。", "healing");
                        break;
index a2a1a64..28eadd4 100644 (file)
@@ -684,7 +684,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
                                msg_print(_("あなたは「パターン」を心に描いてその上を歩いた...", "You picture the Pattern in your mind and walk it..."));
 
                                (void)true_healing(creature_ptr, 0);
-                               (void)restore_all_status();
+                               (void)restore_all_status(creature_ptr);
                                (void)restore_level(creature_ptr);
                        }
                        break;
index 05f9b3f..b62227c 100644 (file)
@@ -430,7 +430,7 @@ concptr do_life_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               (void)restore_all_status();
+                               (void)restore_all_status(caster_ptr);
                                restore_level(caster_ptr);
                        }
                }
index dcc02e7..de57340 100644 (file)
@@ -867,7 +867,7 @@ concptr do_music_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                msg_print(_("暗黒の中に光と美をふりまいた。体が元の活力を取り戻した。",
                                        "You strewed light and beauty in the dark as you sing. You feel refreshed."));
-                               (void)restore_all_status();
+                               (void)restore_all_status(caster_ptr);
                                (void)restore_level(caster_ptr);
                        }
                }
index 14f3ca7..e5fa97d 100644 (file)
@@ -283,7 +283,7 @@ bool_hack life_stream(player_type *creature_ptr, bool_hack message, bool_hack vi
        (void)set_image(creature_ptr, 0);
        (void)set_stun(creature_ptr, 0);
        (void)set_cut(creature_ptr,0);
-       (void)restore_all_status();
+       (void)restore_all_status(creature_ptr);
        (void)set_shero(creature_ptr, 0, TRUE);
        handle_stuff();
        hp_player(creature_ptr, 5000);
@@ -392,15 +392,15 @@ bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater)
        return ident;
 }
 
-bool restore_all_status(void)
+bool restore_all_status(player_type *creature_ptr)
 {
        bool ident = FALSE;
-       if (do_res_stat(p_ptr, A_STR)) ident = TRUE;
-       if (do_res_stat(p_ptr, A_INT)) ident = TRUE;
-       if (do_res_stat(p_ptr, A_WIS)) ident = TRUE;
-       if (do_res_stat(p_ptr, A_DEX)) ident = TRUE;
-       if (do_res_stat(p_ptr, A_CON)) ident = TRUE;
-       if (do_res_stat(p_ptr, A_CHR)) ident = TRUE;
+       if (do_res_stat(creature_ptr, A_STR)) ident = TRUE;
+       if (do_res_stat(creature_ptr, A_INT)) ident = TRUE;
+       if (do_res_stat(creature_ptr, A_WIS)) ident = TRUE;
+       if (do_res_stat(creature_ptr, A_DEX)) ident = TRUE;
+       if (do_res_stat(creature_ptr, A_CON)) ident = TRUE;
+       if (do_res_stat(creature_ptr, A_CHR)) ident = TRUE;
        return ident;
 }
 
index 728f9ba..dda9049 100644 (file)
@@ -21,7 +21,7 @@ extern bool_hack cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice
 extern bool_hack cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow);
 extern bool_hack true_healing(player_type *creature_ptr, HIT_POINT pow);
 extern bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater);
-extern bool restore_all_status(void);
+extern bool restore_all_status(player_type *creature_ptr);
 
 extern bool fishing(player_type *creature_ptr);
 extern bool cosmic_cast_off(player_type *creature_ptr, object_type *o_ptr);