/*!
* @brief 装備するコマンドのメインルーチン / Wield or wear a single item from the pack or floor
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
*/
void do_cmd_wield(player_type *creature_ptr)
{
object_desc(o_name, &creature_ptr->inventory_list[slot], (OD_OMIT_PREFIX | OD_NAME_ONLY));
#ifdef JP
- msg_format("%s%sは呪われているようだ。", describe_use(slot) , o_name );
+ msg_format("%s%sは呪われているようだ。", describe_use(creature_ptr, slot) , o_name);
#else
msg_format("The %s you are %s appears to be cursed.", o_name, describe_use(slot));
#endif
slot = need_switch_wielding;
}
- check_find_art_quest_completion(o_ptr);
+ check_find_art_quest_completion(creature_ptr, o_ptr);
if (creature_ptr->pseikaku == SEIKAKU_MUNCHKIN)
{
identify_item(creature_ptr, o_ptr);
/* Auto-inscription */
- autopick_alter_item(item, FALSE);
+ autopick_alter_item(creature_ptr, item, FALSE);
}
take_turn(creature_ptr, 100);
/* Decrease the item (from the floor) */
else
{
- floor_item_increase(0 - item, -1);
- floor_item_optimize(0 - item);
+ floor_item_increase(creature_ptr->current_floor_ptr, 0 - item, -1);
+ floor_item_optimize(creature_ptr->current_floor_ptr, 0 - item);
}
/* Access the wield slot */
switch (slot)
{
case INVEN_RARM:
- if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_LARM) && CAN_TWO_HANDS_WIELDING())
+ if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_LARM) && can_two_hands_wielding(creature_ptr))
act = STR_WIELD_ARMS;
else
act = (left_hander ? STR_WIELD_LARM : STR_WIELD_RARM);
break;
case INVEN_LARM:
- if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_RARM) && CAN_TWO_HANDS_WIELDING())
+ if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(creature_ptr, FALSE) == EMPTY_HAND_RARM) && can_two_hands_wielding(creature_ptr))
act = STR_WIELD_ARMS;
else
act = (left_hander ? STR_WIELD_RARM : STR_WIELD_LARM);
calc_android_exp(creature_ptr);
}
+
/*!
* @brief 持ち替え処理
+ * @param owner_ptr プレーヤーへの参照ポインタ
* @param item 持ち替えを行いたい装備部位ID
* @return なし
*/
if (object_is_cursed(o_ptr))
{
- if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
+ if (object_allow_two_hands_wielding(o_ptr) && can_two_hands_wielding(owner_ptr))
msg_format(_("%sを両手で構えた。", "You are wielding %s with both hands."), o_name);
return;
}
owner_ptr->total_weight += o_ptr->weight;
inven_item_increase(owner_ptr, INVEN_LARM, -((int)o_ptr->number));
inven_item_optimize(owner_ptr, INVEN_LARM);
- if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
+ if (object_allow_two_hands_wielding(o_ptr) && can_two_hands_wielding(owner_ptr))
msg_format(_("%sを両手で構えた。", "You are wielding %s with both hands."), o_name);
else
msg_format(_("%sを%sで構えた。", "You are wielding %s in your %s hand."), o_name,
if (has_melee_weapon(owner_ptr, INVEN_RARM))
{
- if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
+ if (object_allow_two_hands_wielding(o_ptr) && can_two_hands_wielding(owner_ptr))
msg_format(_("%sを両手で構えた。", "You are wielding %s with both hands."), o_name);
return;
}
/*!
* @brief アイテムを破壊するコマンドのメインルーチン / Destroy an item
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
*/
void do_cmd_destroy(player_type *creature_ptr)
if (i == 'A')
{
/* Add an auto-destroy preference line */
- if (autopick_autoregister(o_ptr))
+ if (autopick_autoregister(creature_ptr, o_ptr))
{
/* Auto-destroy it */
- autopick_alter_item(item, TRUE);
+ autopick_alter_item(creature_ptr, item, TRUE);
}
/* The object is already destroyed. */
x2 = x1 = panel_col_min;
/* Show panels until done */
- while (1)
+ while (TRUE)
{
/* Describe the location */
if ((y2 == y1) && (x2 == x1))
i = n - 1;
/* Scan the monster memory */
- while (1)
+ while (TRUE)
{
r_idx = who[i];
handle_stuff(creature_ptr);
/* Interact */
- while (1)
+ while (TRUE)
{
if (recall)
{