OSDN Git Service

[Refactor] #37917 word_of_recall() と recall_player() を整理。 / Refactor word_of_recall...
[hengband/hengband.git] / src / cmd-zapwand.c
index 3e7e3a0..2e066d1 100644 (file)
@@ -396,7 +396,7 @@ void do_cmd_aim_wand_aux(INVENTORY_IDX item)
                o_ptr->ident |= (IDENT_EMPTY);
 
                /* Combine / Reorder the pack (later) */
-               p_ptr->notice |= (PN_COMBINE | PN_REORDER);
+               p_ptr->update |= (PU_COMBINE | PU_REORDER);
                p_ptr->window |= (PW_INVEN);
 
                return;
@@ -407,7 +407,7 @@ void do_cmd_aim_wand_aux(INVENTORY_IDX item)
        ident = wand_effect(o_ptr->sval, dir, FALSE, FALSE);
 
        /* Combine / Reorder the pack (later) */
-       p_ptr->notice |= (PN_COMBINE | PN_REORDER);
+       p_ptr->update |= (PU_COMBINE | PU_REORDER);
 
        if (!(object_is_aware(o_ptr)))
        {
@@ -452,7 +452,16 @@ void do_cmd_aim_wand_aux(INVENTORY_IDX item)
 void do_cmd_aim_wand(void)
 {
        OBJECT_IDX item;
-       cptr    q, s;
+       cptr q, s;
+
+       if (p_ptr->wild_mode) return;
+
+       if (p_ptr->inside_arena)
+       {
+               msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
+               msg_print(NULL);
+               return;
+       }
 
        /* Restrict choices to wands */
        item_tester_tval = TV_WAND;
@@ -462,12 +471,9 @@ void do_cmd_aim_wand(void)
                set_action(ACTION_NONE);
        }
 
-       /* Get an item */
        q = _("どの魔法棒で狙いますか? ", "Aim which wand? ");
        s = _("使える魔法棒がない。", "You have no wand to aim.");
+       if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
 
-       if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
-
-       /* Aim the wand */
        do_cmd_aim_wand_aux(item);
 }