diff options
author | shennetsind <ind@henn.et> | 2013-06-09 02:03:48 -0300 |
---|---|---|
committer | Euphy <euphy@rathena.org> | 2013-06-15 15:47:49 -0400 |
commit | ab6c3502e63ff89f6acb5731274bdf305d6ae04a (patch) | |
tree | b4b0bda0ef6d4d68124dfb6dac55a42180a958ee | |
parent | 2e97686a3381a84674541ed15028c005c54d31ce (diff) | |
download | hercules-ab6c3502e63ff89f6acb5731274bdf305d6ae04a.tar.gz hercules-ab6c3502e63ff89f6acb5731274bdf305d6ae04a.tar.bz2 hercules-ab6c3502e63ff89f6acb5731274bdf305d6ae04a.tar.xz hercules-ab6c3502e63ff89f6acb5731274bdf305d6ae04a.zip |
Modified @makehomun
Using -1 will now revive a dead homun (finally, it now makes sense >_>)
Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r-- | src/map/atcommand.c | 18 |
1 files changed, 12 insertions, 6 deletions
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 <homunculus id>). 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. |