OSDN Git Service

[Refactor] #38997 identify_pack() に player_type * 引数を追加. / Add player_type * argument...
authordeskull <deskull@users.sourceforge.jp>
Sun, 22 Dec 2019 03:17:33 +0000 (12:17 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 22 Dec 2019 03:17:33 +0000 (12:17 +0900)
src/bldg.c
src/cmd/cmd-quaff.c
src/spells.h
src/spells3.c

index e3241c5..ea7ba57 100644 (file)
@@ -3943,7 +3943,7 @@ static void bldg_process_command(building_type *bldg, int i)
                break;
        case BACT_IDENTS: /* needs work */
                if (!get_check(_("持ち物を全て鑑定してよろしいですか?", "Do you pay for identify all your possession? "))) break;
-               identify_pack();
+               identify_pack(p_ptr);
                msg_print(_(" 持ち物全てが鑑定されました。", "Your possessions have been identified."));
                paid = TRUE;
                break;
index 46bdacf..aa6fbe8 100644 (file)
@@ -399,7 +399,7 @@ void exe_quaff_potion(player_type *creature_ptr, INVENTORY_IDX item)
                        (void)detect_treasure(DETECT_RAD_DEFAULT);
                        (void)detect_objects_gold(DETECT_RAD_DEFAULT);
                        (void)detect_objects_normal(DETECT_RAD_DEFAULT);
-                       identify_pack();
+                       identify_pack(creature_ptr);
                        self_knowledge(creature_ptr);
                        ident = TRUE;
                        break;
index 243f404..3991fa0 100644 (file)
@@ -299,7 +299,7 @@ extern bool apply_disenchant(player_type *target_ptr, BIT_FLAGS mode);
 extern void call_the_void(player_type *caster_ptr);
 extern void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los);
 extern void reserve_alter_reality(player_type *caster_ptr);
-extern void identify_pack(void);
+extern void identify_pack(player_type *target_ptr);
 extern int remove_curse(player_type *caster_ptr);
 extern int remove_all_curse(player_type *caster_ptr);
 extern bool alchemy(player_type *caster_ptr);
index 7585fc5..315d61c 100644 (file)
@@ -1377,17 +1377,17 @@ void reserve_alter_reality(player_type *caster_ptr)
  * Done by a potion of "self knowledge".
  * @return なし
  */
-void identify_pack(void)
+void identify_pack(player_type *target_ptr)
 {
        INVENTORY_IDX i;
 
        /* Simply identify and know every item */
        for (i = 0; i < INVEN_TOTAL; i++)
        {
-               object_type *o_ptr = &p_ptr->inventory_list[i];
+               object_type *o_ptr = &target_ptr->inventory_list[i];
                if (!o_ptr->k_idx) continue;
 
-               identify_item(p_ptr, o_ptr);
+               identify_item(target_ptr, o_ptr);
 
                /* Auto-inscription */
                autopick_alter_item(i, FALSE);