-#include "market/building-recharger.h"
+#include "market/building-recharger.h"
#include "autopick/autopick.h"
#include "core/asking-player.h"
#include "core/window-redrawer.h"
msg_flag = false;
clear_bldg(4, 18);
prt(_(" 再充填の費用はアイテムの種類によります。", " The prices of recharge depend on the type."), 6, 0);
- const auto q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
- const auto s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
- OBJECT_IDX item;
- auto *o_ptr = choose_object(player_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), FuncItemTester(&ItemEntity::can_recharge));
+ constexpr auto q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
+ constexpr auto s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
+ short i_idx;
+ auto *o_ptr = choose_object(player_ptr, &i_idx, q, s, (USE_INVEN | USE_FLOOR), FuncItemTester(&ItemEntity::can_recharge));
if (o_ptr == nullptr) {
return;
}
identify_item(player_ptr, o_ptr);
const auto item_name = describe_flavor(player_ptr, o_ptr, 0);
msg_format(_("%s です。", "You have: %s."), item_name.data());
- autopick_alter_item(player_ptr, item, false);
+ autopick_alter_item(player_ptr, i_idx, false);
building_prt_gold(player_ptr);
}