From b15841ec20dd18f5e126033604de9f6f97a2190f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 9 Jun 2013 02:03:48 -0300 Subject: Modified @makehomun Using -1 will now revive a dead homun (finally, it now makes sense >_>) Signed-off-by: shennetsind --- src/map/atcommand.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/map') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 36c4b987d..835248918 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6867,18 +6867,24 @@ ACMD(hommutate) { ACMD(makehomun) { int homunid; nullpo_retr(-1, sd); - - if ( sd->status.hom_id ) { - clif->message(fd, msg_txt(450)); - return false; - } - + if (!message || !*message) { clif->message(fd, msg_txt(1256)); // Please enter a homunculus ID (usage: @makehomun ). return false; } homunid = atoi(message); + + if( homunid == -1 && sd->status.hom_id && !homun_alive(sd->hd) ) { + homun->call(sd); + return true; + } + + if ( sd->status.hom_id ) { + clif->message(fd, msg_txt(450)); + return false; + } + if( homunid < HM_CLASS_BASE || homunid > HM_CLASS_BASE + MAX_HOMUNCULUS_CLASS - 1 ) { clif->message(fd, msg_txt(1257)); // Invalid Homunculus ID. -- cgit v1.2.3-60-g2f50