OSDN Git Service

[Refactor] #38997 IS_INVULN() に player_type * 引数を追加. / Add player_type * argument...
[hengband/hengband.git] / src / store.c
index b45dff5..da42430 100644 (file)
@@ -3016,7 +3016,7 @@ bool combine_and_reorder_home(int store_num)
 
 /*!
  * @brief 我が家にオブジェクトを加える /
- * Add the item "o_ptr" to the p_ptr->inventory_list of the "Home"
+ * Add the item "o_ptr" to the inventory of the "Home"
  * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
  * @return 収めた先のID
  * @details
@@ -3121,7 +3121,7 @@ static int home_carry(object_type *o_ptr)
 
 /*!
  * @brief 店舗にオブジェクトを加える /
- * Add the item "o_ptr" to a real stores p_ptr->inventory_list.
+ * Add the item "o_ptr" to a real stores inventory.
  * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
  * @return 収めた先のID
  * @details
@@ -3226,7 +3226,7 @@ static int store_carry(object_type *o_ptr)
 
 /*!
  * @brief 店舗のオブジェクト数を増やす /
- * Add the item "o_ptr" to a real stores p_ptr->inventory_list.
+ * Add the item "o_ptr" to a real stores inventory.
  * @param item 増やしたいアイテムのID
  * @param num 増やしたい数
  * @return なし
@@ -3685,7 +3685,7 @@ static void display_entry(int pos)
 
 /*!
  * @brief 店の商品リストを表示する /
- * Displays a store's p_ptr->inventory_list            -RAK-
+ * Displays a store's inventory -RAK-
  * @return なし
  * @details
  * All prices are listed as "per individual object".  -BEN-
@@ -3830,8 +3830,6 @@ static void display_store(void)
 
        /* Display the current gold */
        store_prt_gold();
-
-       /* Draw in the p_ptr->inventory_list */
        display_inventory();
 }
 
@@ -4801,7 +4799,6 @@ static void store_purchase(void)
                                                msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
                                        }
 
-                                       /* New p_ptr->inventory_list */
                                        for (i = 0; i < 10; i++)
                                        {
                                                /* Maintain the store */
@@ -5043,7 +5040,7 @@ static void store_sell(void)
                        /* Get the "apparent" value */
                        dummy = object_value(q_ptr) * q_ptr->number;
 
-                       identify_item(o_ptr);
+                       identify_item(p_ptr, o_ptr);
                        q_ptr = &forge;
 
                        /* Get a copy of the object */
@@ -5130,7 +5127,7 @@ static void store_sell(void)
 
                if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
 
-               identify_item(q_ptr);
+               identify_item(p_ptr, q_ptr);
                q_ptr->ident |= IDENT_MENTAL;
 
                /* Distribute charges of wands/rods */
@@ -5138,10 +5135,7 @@ static void store_sell(void)
                msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
                choice = 0;
 
-               /* Take it from the players p_ptr->inventory_list */
-               inven_item_increase(item, -amt);
-               inven_item_describe(item);
-               inven_item_optimize(item);
+               vary_item(item, -amt);
                handle_stuff();
 
                /* Let the home carry it */
@@ -5163,10 +5157,7 @@ static void store_sell(void)
 
                choice = 0;
 
-               /* Take it from the players p_ptr->inventory_list */
-               inven_item_increase(item, -amt);
-               inven_item_describe(item);
-               inven_item_optimize(item);
+               vary_item(item, -amt);
                handle_stuff();
 
                /* Let the home carry it */
@@ -5763,7 +5754,7 @@ void do_cmd_store(void)
        }
 
        forget_lite(p_ptr->current_floor_ptr);
-       forget_view();
+       forget_view(p_ptr->current_floor_ptr);
 
        /* Hack -- Character is in "icky" mode */
        current_world_ptr->character_icky = TRUE;
@@ -5915,10 +5906,7 @@ void do_cmd_store(void)
 
                                msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
 
-                               /* Remove it from the players p_ptr->inventory_list */
-                               inven_item_increase(item, -255);
-                               inven_item_describe(item);
-                               inven_item_optimize(item);
+                               vary_item(item, -255);
                                handle_stuff();
 
                                /* Let the home carry it */
@@ -6045,7 +6033,7 @@ void store_shuffle(int which)
 
 /*!
  * @brief 店の品揃えを変化させる /
- * Maintain the p_ptr->inventory_list at the stores.
+ * Maintain the inventory at the stores.
  * @param town_num 町のID
  * @param store_num 店舗種類のID
  * @return なし