OSDN Git Service

[feature] ソースファイルをC++に対応
[hengbandforosx/hengbandosx.git] / src / object / warning.c
index e68633b..2771ee7 100644 (file)
@@ -47,7 +47,7 @@
  */
 object_type *choose_warning_item(player_type *creature_ptr)
 {
-    int choices[INVEN_TOTAL - INVEN_RARM];
+    int choices[INVEN_TOTAL - INVEN_MAIN_HAND];
 
     /* Paranoia -- Player has no warning ability */
     if (!creature_ptr->warning)
@@ -55,7 +55,7 @@ object_type *choose_warning_item(player_type *creature_ptr)
 
     /* Search Inventory */
     int number = 0;
-    for (inventory_slot_type i = INVEN_RARM; i < INVEN_TOTAL; i++) {
+    for (int i = INVEN_MAIN_HAND; i < INVEN_TOTAL; i++) {
         BIT_FLAGS flgs[TR_FLAG_SIZE];
         object_type *o_ptr = &creature_ptr->inventory_list[i];
 
@@ -115,11 +115,10 @@ static void spell_damcalc(player_type *target_ptr, monster_type *m_ptr, EFFECT_I
 
     case GF_FIRE:
         if (has_immune_fire(target_ptr)) {
-            dam = 0;
             ignore_wraith_form = TRUE;
-            break;
         }
         dam = dam * calc_fire_damage_rate(target_ptr) / 100;
+        break;
 
     case GF_PSY_SPEAR:
         ignore_wraith_form = TRUE;