• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision2cb9bf2febfbf934441c53c12b9df6b7138f5e8c (tree)
Zeit2019-10-06 19:26:52
Autordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 restore_all_status() に player_type * 引数を追加. / Add player_type * argument to restore_all_status().

Ändern Zusammenfassung

Diff

--- a/src/bldg.c
+++ b/src/bldg.c
@@ -3972,7 +3972,7 @@ static void bldg_process_command(building_type *bldg, int i)
39723972 paid = cure_critical_wounds(p_ptr, 200);
39733973 break;
39743974 case BACT_RESTORE: /* needs work */
3975- paid = restore_all_status();
3975+ paid = restore_all_status(p_ptr);
39763976 break;
39773977 case BACT_ENCHANT_ARROWS:
39783978 item_tester_hook = item_tester_hook_ammo;
--- a/src/cmd/cmd-activate.c
+++ b/src/cmd/cmd-activate.c
@@ -1267,7 +1267,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
12671267 case ACT_REST_ALL:
12681268 {
12691269 msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
1270- (void)restore_all_status();
1270+ (void)restore_all_status(user_ptr);
12711271 (void)restore_level(user_ptr);
12721272 break;
12731273 }
--- a/src/cmd/cmd-eat.c
+++ b/src/cmd/cmd-eat.c
@@ -220,7 +220,7 @@ void exe_eat_food(player_type *creature_ptr, INVENTORY_IDX item)
220220
221221 case SV_FOOD_RESTORING:
222222 {
223- ident = restore_all_status();
223+ ident = restore_all_status(creature_ptr);
224224 break;
225225 }
226226
--- a/src/cmd/cmd-zaprod.c
+++ b/src/cmd/cmd-zaprod.c
@@ -113,7 +113,7 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d
113113 case SV_ROD_RESTORATION:
114114 {
115115 if(restore_level(creature_ptr)) ident = TRUE;
116- if(restore_all_status()) ident = TRUE;
116+ if(restore_all_status(creature_ptr)) ident = TRUE;
117117 break;
118118 }
119119
--- a/src/core.c
+++ b/src/core.c
@@ -707,7 +707,7 @@ static bool pattern_effect(player_type *creature_ptr)
707707 {
708708 case PATTERN_TILE_END:
709709 (void)set_image(creature_ptr, 0);
710- (void)restore_all_status();
710+ (void)restore_all_status(creature_ptr);
711711 (void)restore_level(creature_ptr);
712712 (void)cure_critical_wounds(creature_ptr, 1000);
713713
--- a/src/patron.c
+++ b/src/patron.c
@@ -484,7 +484,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward)
484484
485485 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[creature_ptr->chaos_patron]);
486486 (void)restore_level(creature_ptr);
487- (void)restore_all_status();
487+ (void)restore_all_status(creature_ptr);
488488 (void)true_healing(creature_ptr, 5000);
489489 reward = _("体力が回復した。", "healing");
490490 break;
--- a/src/racial.c
+++ b/src/racial.c
@@ -684,7 +684,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
684684 msg_print(_("あなたは「パターン」を心に描いてその上を歩いた...", "You picture the Pattern in your mind and walk it..."));
685685
686686 (void)true_healing(creature_ptr, 0);
687- (void)restore_all_status();
687+ (void)restore_all_status(creature_ptr);
688688 (void)restore_level(creature_ptr);
689689 }
690690 break;
--- a/src/realm-life.c
+++ b/src/realm-life.c
@@ -430,7 +430,7 @@ concptr do_life_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
430430 {
431431 if (cast)
432432 {
433- (void)restore_all_status();
433+ (void)restore_all_status(caster_ptr);
434434 restore_level(caster_ptr);
435435 }
436436 }
--- a/src/realm-song.c
+++ b/src/realm-song.c
@@ -867,7 +867,7 @@ concptr do_music_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
867867 {
868868 msg_print(_("暗黒の中に光と美をふりまいた。体が元の活力を取り戻した。",
869869 "You strewed light and beauty in the dark as you sing. You feel refreshed."));
870- (void)restore_all_status();
870+ (void)restore_all_status(caster_ptr);
871871 (void)restore_level(caster_ptr);
872872 }
873873 }
--- a/src/spells-status.c
+++ b/src/spells-status.c
@@ -283,7 +283,7 @@ bool_hack life_stream(player_type *creature_ptr, bool_hack message, bool_hack vi
283283 (void)set_image(creature_ptr, 0);
284284 (void)set_stun(creature_ptr, 0);
285285 (void)set_cut(creature_ptr,0);
286- (void)restore_all_status();
286+ (void)restore_all_status(creature_ptr);
287287 (void)set_shero(creature_ptr, 0, TRUE);
288288 handle_stuff();
289289 hp_player(creature_ptr, 5000);
@@ -392,15 +392,15 @@ bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater)
392392 return ident;
393393 }
394394
395-bool restore_all_status(void)
395+bool restore_all_status(player_type *creature_ptr)
396396 {
397397 bool ident = FALSE;
398- if (do_res_stat(p_ptr, A_STR)) ident = TRUE;
399- if (do_res_stat(p_ptr, A_INT)) ident = TRUE;
400- if (do_res_stat(p_ptr, A_WIS)) ident = TRUE;
401- if (do_res_stat(p_ptr, A_DEX)) ident = TRUE;
402- if (do_res_stat(p_ptr, A_CON)) ident = TRUE;
403- if (do_res_stat(p_ptr, A_CHR)) ident = TRUE;
398+ if (do_res_stat(creature_ptr, A_STR)) ident = TRUE;
399+ if (do_res_stat(creature_ptr, A_INT)) ident = TRUE;
400+ if (do_res_stat(creature_ptr, A_WIS)) ident = TRUE;
401+ if (do_res_stat(creature_ptr, A_DEX)) ident = TRUE;
402+ if (do_res_stat(creature_ptr, A_CON)) ident = TRUE;
403+ if (do_res_stat(creature_ptr, A_CHR)) ident = TRUE;
404404 return ident;
405405 }
406406
--- a/src/spells-status.h
+++ b/src/spells-status.h
@@ -21,7 +21,7 @@ extern bool_hack cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice
2121 extern bool_hack cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow);
2222 extern bool_hack true_healing(player_type *creature_ptr, HIT_POINT pow);
2323 extern bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater);
24-extern bool restore_all_status(void);
24+extern bool restore_all_status(player_type *creature_ptr);
2525
2626 extern bool fishing(player_type *creature_ptr);
2727 extern bool cosmic_cast_off(player_type *creature_ptr, object_type *o_ptr);
Show on old repository browser