OSDN Git Service

[Refactor] #40514 player_type の resist_nexus 変数を廃止. / Abolished resist_nexus variable...
[hengband/hengband.git] / src / player / race-resistances.c
index cf4b581..5053a73 100644 (file)
@@ -1,5 +1,6 @@
 #include "race-resistances.h"
 #include "inventory/inventory-slot-types.h"
+#include "mutation/mutation-flag-types.h"
 #include "player/player-race-types.h"
 #include "object/object-flags.h"
 #include "object-enchant/tr-types.h"
@@ -70,7 +71,7 @@ void known_obj_immunity(player_type *creature_ptr, BIT_FLAGS *flags)
        for (int i = 0; i < TR_FLAG_SIZE; i++)
                flags[i] = 0L;
 
-       for (int i = INVEN_RARM; i < INVEN_TOTAL; i++)
+       for (inventory_slot_type i = INVEN_RARM; i < INVEN_TOTAL; i++)
        {
                u32b o_flags[TR_FLAG_SIZE];
                object_type *o_ptr;
@@ -78,10 +79,10 @@ void known_obj_immunity(player_type *creature_ptr, BIT_FLAGS *flags)
                if (!o_ptr->k_idx) continue;
 
                object_flags_known(creature_ptr, o_ptr, o_flags);
-               if (have_flag(o_flags, TR_IM_ACID)) add_flag(flags, TR_RES_ACID);
-               if (have_flag(o_flags, TR_IM_ELEC)) add_flag(flags, TR_RES_ELEC);
-               if (have_flag(o_flags, TR_IM_FIRE)) add_flag(flags, TR_RES_FIRE);
-               if (have_flag(o_flags, TR_IM_COLD)) add_flag(flags, TR_RES_COLD);
+               if (has_flag(o_flags, TR_IM_ACID)) add_flag(flags, TR_RES_ACID);
+               if (has_flag(o_flags, TR_IM_ELEC)) add_flag(flags, TR_RES_ELEC);
+               if (has_flag(o_flags, TR_IM_FIRE)) add_flag(flags, TR_RES_FIRE);
+               if (has_flag(o_flags, TR_IM_COLD)) add_flag(flags, TR_RES_COLD);
        }
 }