• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionade2627e7fc368973d8e9bdfae2705fc793b103c (tree)
Time2019-07-13 12:58:04
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/player-status.c
+++ b/src/player-status.c
@@ -3151,7 +3151,7 @@ void calc_bonuses(void)
31513151 o_ptr = &p_ptr->inventory_list[INVEN_BOW];
31523152
31533153 /* It is hard to carholdry a heavy bow */
3154- p_ptr->heavy_shoot = is_heavy_shoot(o_ptr);
3154+ p_ptr->heavy_shoot = is_heavy_shoot(p_ptr, o_ptr);
31553155 if (p_ptr->heavy_shoot)
31563156 {
31573157 /* Hard to wield a heavy bow */
@@ -4859,7 +4859,7 @@ s16b calc_num_fire(player_type *creature_ptr, object_type *o_ptr)
48594859 object_flags(o_ptr, flgs);
48604860 if (have_flag(flgs, TR_XTRA_SHOTS)) extra_shots++;
48614861
4862- if (o_ptr->k_idx && !is_heavy_shoot(o_ptr))
4862+ if (o_ptr->k_idx && !is_heavy_shoot(creature_ptr, o_ptr))
48634863 {
48644864 num = 100;
48654865 /* Extra shots */
--- a/src/player-status.h
+++ b/src/player-status.h
@@ -734,7 +734,7 @@ extern s16b calc_num_fire(player_type *creature_ptr, object_type *o_ptr);
734734 extern void calc_bonuses(void);
735735 extern WEIGHT weight_limit(player_type *creature_ptr);
736736 extern bool has_melee_weapon(player_type *creature_ptr, int i);
737-extern bool is_heavy_shoot(object_type *o_ptr);
737+extern bool is_heavy_shoot(player_type *creature_ptr, object_type *o_ptr);
738738
739739 extern bool heavy_armor(player_type *creature_ptr);
740740 extern void update_creature(player_type *creature_ptr);
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -2066,9 +2066,9 @@ static void fix_object(void)
20662066 * @param o_ptr 判定する射撃武器のアイテム情報参照ポインタ
20672067 * @return 重すぎるならばTRUE
20682068 */
2069-bool is_heavy_shoot(object_type *o_ptr)
2069+bool is_heavy_shoot(player_type *creature_ptr, object_type *o_ptr)
20702070 {
2071- int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
2071+ int hold = adj_str_hold[creature_ptr->stat_ind[A_STR]];
20722072 /* It is hard to carholdry a heavy bow */
20732073 return (hold < o_ptr->weight / 10);
20742074 }
Show on old repository browser