From 6fff81d35fc850c5bda23afe6e156c73cd015bd0 Mon Sep 17 00:00:00 2001 From: deskull Date: Sat, 10 Nov 2012 23:55:47 +0000 Subject: [PATCH] =?utf8?q?=E3=82=A6=E3=82=A3=E3=82=B6=E3=83=BC=E3=83=89?= =?utf8?q?=E3=83=A2=E3=83=BC=E3=83=89=E3=81=AE=E5=9B=BA=E5=AE=9A=E3=82=A2?= =?utf8?q?=E3=83=BC=E3=83=86=E3=82=A3=E3=83=95=E3=82=A1=E3=82=AF=E3=83=88?= =?utf8?q?=E7=94=9F=E6=88=90=E5=87=A6=E7=90=86=E3=82=92=E4=BF=AE=E6=AD=A3?= =?utf8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/wizard2.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/wizard2.c b/src/wizard2.c index 31a7b2955..1d93ee8bf 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -118,8 +118,19 @@ static bool wiz_dimension_door(void) * Create the artifact of the specified number -- DAN * */ -static void wiz_create_named_art(int a_idx) +static void wiz_create_named_art(void) { + char tmp_val[80]; + int a_idx; + + /* Query */ + if (!get_string("Artifact ID:", tmp_val, 3)) return; + + /* Extract */ + a_idx = atoi(tmp_val); + if(a_idx < 0) a_idx = 0; + if(a_idx >= max_a_idx) a_idx = 0; + /* Create the artifact */ (void)create_named_art(a_idx, py, px); @@ -1928,7 +1939,7 @@ void do_cmd_debug(void) /* Create a named artifact */ case 'C': - wiz_create_named_art(command_arg); + wiz_create_named_art(); break; /* Detect everything */ -- 2.11.0