OSDN Git Service

[Fix] #38997 cmd-usestaff.c 内変数参照修正. / Fix variable references in cmd-usestaff.c.
authordeskull <deskull@users.sourceforge.jp>
Fri, 3 Jan 2020 14:43:13 +0000 (23:43 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Fri, 3 Jan 2020 14:43:13 +0000 (23:43 +0900)
src/cmd/cmd-usestaff.c

index 82e7f2e..aa141e0 100644 (file)
@@ -65,7 +65,7 @@ int staff_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, bool *use
                        const int times = randint1(powerful ? 8 : 4);
                        for (k = 0; k < times; k++)
                        {
-                               if (summon_specific(0, creature_ptr->y, creature_ptr->x, p_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+                               if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
                                {
                                        ident = TRUE;
                                }
@@ -290,7 +290,7 @@ void exe_use_staff(player_type *creature_ptr, INVENTORY_IDX item)
        /* Hack -- let staffs of identify get aborted */
        bool use_charge = TRUE;
 
-       o_ptr = REF_ITEM(creature_ptr, p_ptr->current_floor_ptr, item);
+       o_ptr = REF_ITEM(creature_ptr, creature_ptr->current_floor_ptr, item);
 
        /* Mega-Hack -- refuse to use a pile from the ground */
        if ((item < 0) && (o_ptr->number > 1))
@@ -434,7 +434,7 @@ void do_cmd_use_staff(player_type *creature_ptr)
 
        q = _("どの杖を使いますか? ", "Use which staff? ");
        s = _("使える杖がない。", "You have no staff to use.");
-       if (!choose_object(p_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), TV_STAFF)) return;
+       if (!choose_object(creature_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), TV_STAFF)) return;
 
        exe_use_staff(creature_ptr, item);
 }