変愚蛮怒のメインリポジトリです
Revision | 52dfd28b9f33ae3440dd7d8dc2bcce85e739bb5d (tree) |
---|---|
Time | 2019-07-04 20:22:50 |
Author | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #38997 get_stats() に player_type * 引数を追加.
@@ -1097,7 +1097,7 @@ static int adjust_stat(int value, int amount) | ||
1097 | 1097 | * For efficiency, we include a chunk of "calc_bonuses()".\n |
1098 | 1098 | * @return なし |
1099 | 1099 | */ |
1100 | -static void get_stats(void) | |
1100 | +static void get_stats(player_type *creature_ptr) | |
1101 | 1101 | { |
1102 | 1102 | /* Roll and verify some stats */ |
1103 | 1103 | while (TRUE) |
@@ -1119,7 +1119,7 @@ static void get_stats(void) | ||
1119 | 1119 | |
1120 | 1120 | /* Save that value */ |
1121 | 1121 | sum += val; |
1122 | - p_ptr->stat_cur[3*i] = p_ptr->stat_max[3*i] = val; | |
1122 | + creature_ptr->stat_cur[3*i] = creature_ptr->stat_max[3*i] = val; | |
1123 | 1123 | |
1124 | 1124 | /* Extract 5 + 1d3 + 1d4 + 1d5 */ |
1125 | 1125 | val = 5 + 3; |
@@ -1129,7 +1129,7 @@ static void get_stats(void) | ||
1129 | 1129 | |
1130 | 1130 | /* Save that value */ |
1131 | 1131 | sum += val; |
1132 | - p_ptr->stat_cur[3*i+1] = p_ptr->stat_max[3*i+1] = val; | |
1132 | + creature_ptr->stat_cur[3*i+1] = creature_ptr->stat_max[3*i+1] = val; | |
1133 | 1133 | |
1134 | 1134 | /* Extract 5 + 1d3 + 1d4 + 1d5 */ |
1135 | 1135 | val = 5 + 3; |
@@ -1139,7 +1139,7 @@ static void get_stats(void) | ||
1139 | 1139 | |
1140 | 1140 | /* Save that value */ |
1141 | 1141 | sum += val; |
1142 | - p_ptr->stat_cur[3*i+2] = p_ptr->stat_max[3*i+2] = val; | |
1142 | + creature_ptr->stat_cur[3*i+2] = creature_ptr->stat_max[3*i+2] = val; | |
1143 | 1143 | } |
1144 | 1144 | |
1145 | 1145 | /* Verify totals */ |
@@ -4193,7 +4193,7 @@ static bool player_birth_aux(void) | ||
4193 | 4193 | else |
4194 | 4194 | { |
4195 | 4195 | /* Get a new character */ |
4196 | - get_stats(); | |
4196 | + get_stats(p_ptr); | |
4197 | 4197 | |
4198 | 4198 | /* Roll for age/height/weight */ |
4199 | 4199 | get_ahw(); |
@@ -4255,7 +4255,7 @@ static bool player_birth_aux(void) | ||
4255 | 4255 | bool accept = TRUE; |
4256 | 4256 | |
4257 | 4257 | /* Get a new character */ |
4258 | - get_stats(); | |
4258 | + get_stats(p_ptr); | |
4259 | 4259 | |
4260 | 4260 | /* Advance the round */ |
4261 | 4261 | auto_round++; |