if (p_ptr->pclass == CLASS_FORCETRAINER)
{
- if (player_has_no_spellbooks())
+ if (player_has_no_spellbooks(p_ptr))
{
confirm_use_force(TRUE);
return;
if (p_ptr->pclass == CLASS_FORCETRAINER)
{
- if (player_has_no_spellbooks())
+ if (player_has_no_spellbooks(p_ptr))
{
confirm_use_force(FALSE);
return;
* @brief プレイヤーが魔道書を一冊も持っていないかを判定する
* @return 魔道書を一冊も持っていないならTRUEを返す
*/
-bool player_has_no_spellbooks(void)
+bool player_has_no_spellbooks(player_type *creature_ptr)
{
int i;
object_type *o_ptr;
for (i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &p_ptr->inventory_list[i];
+ o_ptr = &creature_ptr->inventory_list[i];
if (o_ptr->k_idx && check_book_realm(o_ptr->tval, o_ptr->sval)) return FALSE;
}
- for (i = current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].o_idx; i; i = o_ptr->next_o_idx)
+ for (i = current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].o_idx; i; i = o_ptr->next_o_idx)
{
o_ptr = ¤t_floor_ptr->o_list[i];
if (o_ptr->k_idx && (o_ptr->marked & OM_FOUND) && check_book_realm(o_ptr->tval, o_ptr->sval)) return FALSE;
extern bool heavy_armor(player_type *creature_ptr);
extern void update_creature(player_type *creature_ptr);
extern BIT_FLAGS16 empty_hands(bool riding_control);
-extern bool player_has_no_spellbooks(void);
+extern bool player_has_no_spellbooks(player_type *creature_ptr);
extern void take_turn(player_type *creature_ptr, PERCENTAGE need_cost);
extern void free_turn(player_type *creature_ptr);