• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision0ee1c3db5d60e63d46386f5c97eef5f4603fbeec (tree)
Time2019-07-02 23:49:57
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -1152,7 +1152,7 @@ static void get_stats(void)
11521152 * @brief プレイヤーの限界ステータスを決める。
11531153 * @return なし
11541154 */
1155-void get_max_stats(void)
1155+void get_max_stats(player_type *creature_ptr)
11561156 {
11571157 int i, j;
11581158 int dice[6];
@@ -1180,14 +1180,14 @@ void get_max_stats(void)
11801180 BASE_STATUS max_max = 18 + 60 + dice[i]*10;
11811181
11821182 /* Save that value */
1183- p_ptr->stat_max_max[i] = max_max;
1184- if (p_ptr->stat_max[i] > max_max)
1185- p_ptr->stat_max[i] = max_max;
1186- if (p_ptr->stat_cur[i] > max_max)
1187- p_ptr->stat_cur[i] = max_max;
1183+ creature_ptr->stat_max_max[i] = max_max;
1184+ if (creature_ptr->stat_max[i] > max_max)
1185+ creature_ptr->stat_max[i] = max_max;
1186+ if (creature_ptr->stat_cur[i] > max_max)
1187+ creature_ptr->stat_cur[i] = max_max;
11881188 }
1189- p_ptr->knowledge &= ~(KNOW_STAT);
1190- p_ptr->redraw |= (PR_STATS);
1189+ creature_ptr->knowledge &= ~(KNOW_STAT);
1190+ creature_ptr->redraw |= (PR_STATS);
11911191 }
11921192
11931193
@@ -4464,7 +4464,7 @@ static bool player_birth_aux(void)
44644464
44654465 /*** Finish up ***/
44664466
4467- get_max_stats();
4467+ get_max_stats(p_ptr);
44684468
44694469 get_virtues(p_ptr);
44704470
--- a/src/birth.h
+++ b/src/birth.h
@@ -39,7 +39,7 @@ extern birther previous_char;
3939 /* birth.c */
4040 extern void add_history_from_pref_line(concptr t);
4141 extern void player_birth(player_type *creature_ptr);
42-extern void get_max_stats(void);
42+extern void get_max_stats(player_type *creature_ptr);
4343 extern void get_height_weight(void);
4444 extern void player_outfit(void);
4545 extern void dump_yourself(FILE *fff);
--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -468,7 +468,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
468468
469469 case SV_POTION_NEW_LIFE:
470470 roll_hitdice(p_ptr, 0L);
471- get_max_stats();
471+ get_max_stats(p_ptr);
472472 p_ptr->update |= PU_BONUS;
473473 lose_all_mutations(p_ptr);
474474 ident = TRUE;
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -3879,7 +3879,7 @@ void do_poly_self(player_type *creature_ptr)
38793879 {
38803880 power -= 10;
38813881
3882- get_max_stats();
3882+ get_max_stats(p_ptr);
38833883 roll_hitdice(creature_ptr, 0L);
38843884 }
38853885
Show on old repository browser