#include "angband.h"
+#include "util.h"
+
+#include "cmd-dump.h"
#include "floor.h"
#include "grid.h"
#include "melee.h"
#include "player-move.h"
#include "player-status.h"
#include "player-effects.h"
+#include "player-skill.h"
+#include "player-class.h"
#include "object-hook.h"
#include "monster.h"
#include "monster-status.h"
#include "cmd-pet.h"
#include "cmd-basic.h"
#include "view-mainwindow.h"
+#include "targeting.h"
+#include "world.h"
/*!
* @brief プレイヤーの騎乗/下馬処理判定
bool player_can_ride_aux(grid_type *g_ptr, bool now_riding)
{
bool p_can_enter;
- bool old_character_xtra = character_xtra;
+ bool old_character_xtra = current_world_ptr->character_xtra;
MONSTER_IDX old_riding = p_ptr->riding;
bool old_riding_ryoute = p_ptr->riding_ryoute;
bool old_old_riding_ryoute = p_ptr->old_riding_ryoute;
bool old_pf_ryoute = (p_ptr->pet_extra_flags & PF_RYOUTE) ? TRUE : FALSE;
/* Hack -- prevent "icky" message */
- character_xtra = TRUE;
+ current_world_ptr->character_xtra = TRUE;
if (now_riding) p_ptr->riding = g_ptr->m_idx;
else
p_ptr->update |= PU_BONUS;
handle_stuff();
- character_xtra = old_character_xtra;
+ current_world_ptr->character_xtra = old_character_xtra;
return p_can_enter;
}
total_friends = 0;
- for (m_idx = m_max - 1; m_idx >= 1; m_idx--)
+ for (m_idx = current_floor_ptr->m_max - 1; m_idx >= 1; m_idx--)
{
monster_type *m_ptr;
monster_race *r_ptr;
C_MAKE(who, current_floor_ptr->max_m_idx, MONSTER_IDX);
/* Process the monsters (backwards) */
- for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
+ for (pet_ctr = current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
{
if (is_pet(¤t_floor_ptr->m_list[pet_ctr]))
who[max_pet++] = pet_ctr;
if (p_ptr->riding)
{
if ((p_ptr->migite && (empty_hands(FALSE) == EMPTY_HAND_LARM) &&
- object_allow_two_hands_wielding(&inventory[INVEN_RARM])) ||
+ object_allow_two_hands_wielding(&p_ptr->inventory_list[INVEN_RARM])) ||
(p_ptr->hidarite && (empty_hands(FALSE) == EMPTY_HAND_RARM) &&
- object_allow_two_hands_wielding(&inventory[INVEN_LARM])))
+ object_allow_two_hands_wielding(&p_ptr->inventory_list[INVEN_LARM])))
{
if (p_ptr->pet_extra_flags & PF_RYOUTE)
{
case PET_DISMISS: /* Dismiss pets */
{
/* Check pets (backwards) */
- for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
+ for (pet_ctr = current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
{
/* Player has pet */
if (is_pet(¤t_floor_ptr->m_list[pet_ctr])) break;
if (p_ptr->pet_extra_flags & PF_PICKUP_ITEMS)
{
p_ptr->pet_extra_flags &= ~(PF_PICKUP_ITEMS);
- for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
+ for (pet_ctr = current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
{
/* Access the monster */
m_ptr = ¤t_floor_ptr->m_list[pet_ctr];