OSDN Git Service

[Refactor] 不要になった player_type 引数を削除
[hengbandforosx/hengbandosx.git] / src / object-use / throw-execution.cpp
index 9400224..0cd44c1 100644 (file)
@@ -99,7 +99,7 @@ bool ObjectThrowEntity::check_can_throw()
 void ObjectThrowEntity::calc_throw_range()
 {
     this->q_ptr->copy_from(this->o_ptr);
-    object_flags(this->creature_ptr, this->q_ptr, this->obj_flags);
+    object_flags(this->q_ptr, this->obj_flags);
     torch_flags(this->q_ptr, this->obj_flags);
     distribute_charges(this->o_ptr, this->q_ptr, 1);
     this->q_ptr->number = 1;
@@ -317,7 +317,7 @@ void ObjectThrowEntity::drop_thrown_item()
         return;
     }
 
-    auto is_bold = cave_has_flag_bold(this->creature_ptr->current_floor_ptr, this->y, this->x, FF_PROJECT);
+    auto is_bold = cave_has_flag_bold(this->creature_ptr->current_floor_ptr, this->y, this->x, FF::PROJECT);
     auto drop_y = is_bold ? this->y : this->prev_y;
     auto drop_x = is_bold ? this->x : this->prev_x;
     (void)drop_near(this->creature_ptr, this->q_ptr, this->corruption_possibility, drop_y, drop_x);
@@ -354,7 +354,7 @@ bool ObjectThrowEntity::check_throw_boomerang(concptr *q, concptr *s)
     }
 
     if (has_melee_weapon(this->creature_ptr, INVEN_MAIN_HAND) && has_melee_weapon(this->creature_ptr, INVEN_SUB_HAND)) {
-        item_tester_hook = item_tester_hook_boomerang;
+        item_tester_hook = make_item_tester(object_is_boomerang);
         *q = _("どの武器を投げますか? ", "Throw which item? ");
         *s = _("投げる武器がない。", "You have nothing to throw.");
         this->o_ptr = choose_object(this->creature_ptr, &this->item, *q, *s, USE_EQUIP, TV_NONE);
@@ -383,7 +383,7 @@ bool ObjectThrowEntity::check_racial_target_bold()
     this->nx[this->cur_dis] = this->x;
     mmove2(&this->ny[this->cur_dis], &this->nx[this->cur_dis], this->creature_ptr->y, this->creature_ptr->x, this->ty, this->tx);
     auto *floor_ptr = this->creature_ptr->current_floor_ptr;
-    if (cave_has_flag_bold(floor_ptr, this->ny[this->cur_dis], this->nx[this->cur_dis], FF_PROJECT)) {
+    if (cave_has_flag_bold(floor_ptr, this->ny[this->cur_dis], this->nx[this->cur_dis], FF::PROJECT)) {
         return false;
     }