OSDN Git Service

[Refactor] #38844 inven_cnt, equip_cnt を player_type 構造体に取り込み.
[hengband/hengband.git] / src / load.c
index c9b84cf..1aa74e6 100644 (file)
@@ -2413,8 +2413,8 @@ static errr rd_inventory(void)
        p_ptr->total_weight = 0;
 
        /* No items */
-       inven_cnt = 0;
-       equip_cnt = 0;
+       p_ptr->inven_cnt = 0;
+       p_ptr->equip_cnt = 0;
 
        /* Read until done */
        while (1)
@@ -2445,11 +2445,11 @@ static errr rd_inventory(void)
                        p_ptr->total_weight += (q_ptr->number * q_ptr->weight);
 
                        /* One more item */
-                       equip_cnt++;
+                       p_ptr->equip_cnt++;
                }
 
                /* Warning -- backpack is full */
-               else if (inven_cnt == INVEN_PACK)
+               else if (p_ptr->inven_cnt == INVEN_PACK)
                {
                        note(_("持ち物の中のアイテムが多すぎる!", "Too many items in the p_ptr->inventory_list!"));
 
@@ -2470,7 +2470,7 @@ static errr rd_inventory(void)
                        p_ptr->total_weight += (q_ptr->number * q_ptr->weight);
 
                        /* One more item */
-                       inven_cnt++;
+                       p_ptr->inven_cnt++;
                }
        }