• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionc68164b1588ab0a941a7625ebe49a8d83c70da16 (tree)
Time2019-06-27 00:14:37
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 restore_level() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -1268,7 +1268,7 @@ bool activate_artifact(object_type *o_ptr)
12681268 case ACT_REST_EXP:
12691269 {
12701270 msg_print(_("深紅に輝いている...", "It glows a deep red..."));
1271- restore_level();
1271+ restore_level(p_ptr);
12721272 break;
12731273 }
12741274
@@ -1276,7 +1276,7 @@ bool activate_artifact(object_type *o_ptr)
12761276 {
12771277 msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
12781278 (void)restore_all_status();
1279- (void)restore_level();
1279+ (void)restore_level(p_ptr);
12801280 break;
12811281 }
12821282
--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -341,7 +341,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
341341 break;
342342
343343 case SV_POTION_RESTORE_EXP:
344- if (restore_level()) ident = TRUE;
344+ if (restore_level(p_ptr)) ident = TRUE;
345345 break;
346346
347347 case SV_POTION_RES_STR:
--- a/src/cmd-zaprod.c
+++ b/src/cmd-zaprod.c
@@ -111,7 +111,7 @@ int rod_effect(OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool
111111
112112 case SV_ROD_RESTORATION:
113113 {
114- if(restore_level()) ident = TRUE;
114+ if(restore_level(p_ptr)) ident = TRUE;
115115 if(restore_all_status()) ident = TRUE;
116116 break;
117117 }
--- a/src/core.c
+++ b/src/core.c
@@ -708,7 +708,7 @@ static bool pattern_effect(void)
708708 case PATTERN_TILE_END:
709709 (void)set_image(p_ptr, 0);
710710 (void)restore_all_status();
711- (void)restore_level();
711+ (void)restore_level(p_ptr);
712712 (void)cure_critical_wounds(1000);
713713
714714 cave_set_feat(p_ptr->y, p_ptr->x, feat_pattern_old);
--- a/src/patron.c
+++ b/src/patron.c
@@ -483,7 +483,7 @@ void gain_level_reward(int chosen_reward)
483483 case REW_HEAL_FUL:
484484
485485 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
486- (void)restore_level();
486+ (void)restore_level(p_ptr);
487487 (void)restore_all_status();
488488 (void)true_healing(5000);
489489 reward = _("体力が回復した。", "healing");
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -3614,15 +3614,15 @@ bool do_inc_stat(player_type *creature_ptr, int stat)
36143614 /*
36153615 * Restores any drained experience
36163616 */
3617-bool restore_level(void)
3617+bool restore_level(player_type *creature_ptr)
36183618 {
36193619 /* Restore experience */
3620- if (p_ptr->exp < p_ptr->max_exp)
3620+ if (creature_ptr->exp < creature_ptr->max_exp)
36213621 {
36223622 msg_print(_("経験値が戻ってきた気がする。", "You feel your experience returning."));
36233623
36243624 /* Restore the experience */
3625- p_ptr->exp = p_ptr->max_exp;
3625+ creature_ptr->exp = creature_ptr->max_exp;
36263626
36273627 /* Check the experience */
36283628 check_experience();
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -64,7 +64,7 @@ extern bool hp_player(player_type *creature_ptr, int num);
6464 extern bool do_dec_stat(player_type *creature_ptr, int stat);
6565 extern bool do_res_stat(player_type *creature_ptr, int stat);
6666 extern bool do_inc_stat(player_type *creature_ptr, int stat);
67-extern bool restore_level(void);
67+extern bool restore_level(player_type *creature_ptr);
6868 extern bool lose_all_info(void);
6969 extern void gain_exp_64(s32b amount, u32b amount_frac);
7070 extern void gain_exp(s32b amount);
--- a/src/racial.c
+++ b/src/racial.c
@@ -685,7 +685,7 @@ static bool cmd_racial_power_aux(s32b command)
685685
686686 (void)true_healing(0);
687687 (void)restore_all_status();
688- (void)restore_level();
688+ (void)restore_level(p_ptr);
689689 }
690690 break;
691691
@@ -780,7 +780,7 @@ static bool cmd_racial_power_aux(s32b command)
780780 case RACE_SKELETON:
781781 case RACE_ZOMBIE:
782782 msg_print(_("あなたは失ったエネルギーを取り戻そうと試みた。", "You attempt to restore your lost energies."));
783- (void)restore_level();
783+ (void)restore_level(p_ptr);
784784 break;
785785
786786 case RACE_VAMPIRE:
--- a/src/realm-death.c
+++ b/src/realm-death.c
@@ -574,7 +574,7 @@ concptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
574574 {
575575 if (cast)
576576 {
577- restore_level();
577+ restore_level(p_ptr);
578578 }
579579 }
580580 break;
--- a/src/realm-life.c
+++ b/src/realm-life.c
@@ -431,7 +431,7 @@ concptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
431431 if (cast)
432432 {
433433 (void)restore_all_status();
434- restore_level();
434+ restore_level(p_ptr);
435435 }
436436 }
437437 break;
--- a/src/realm-song.c
+++ b/src/realm-song.c
@@ -868,7 +868,7 @@ concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
868868 msg_print(_("暗黒の中に光と美をふりまいた。体が元の活力を取り戻した。",
869869 "You strewed light and beauty in the dark as you sing. You feel refreshed."));
870870 (void)restore_all_status();
871- (void)restore_level();
871+ (void)restore_level(p_ptr);
872872 }
873873 }
874874 break;
--- a/src/spells-status.c
+++ b/src/spells-status.c
@@ -276,7 +276,7 @@ bool_hack life_stream(bool_hack message, bool_hack virtue_change)
276276 {
277277 msg_print(_("体中に生命力が満ちあふれてきた!", "You feel life flow through your body!"));
278278 }
279- restore_level();
279+ restore_level(p_ptr);
280280 (void)set_poisoned(p_ptr, 0);
281281 (void)set_blind(p_ptr, 0);
282282 (void)set_confused(p_ptr, 0);
Show on old repository browser