summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-09 02:03:48 -0300
committershennetsind <ind@henn.et>2013-06-09 02:03:48 -0300
commitb15841ec20dd18f5e126033604de9f6f97a2190f (patch)
tree583d93bd0434459501f936c28472b57f4328c7cd /src/map/atcommand.c
parent2cc9abbaab66417f50492252d1534f3a0fcceaa7 (diff)
downloadhercules-b15841ec20dd18f5e126033604de9f6f97a2190f.tar.gz
hercules-b15841ec20dd18f5e126033604de9f6f97a2190f.tar.bz2
hercules-b15841ec20dd18f5e126033604de9f6f97a2190f.tar.xz
hercules-b15841ec20dd18f5e126033604de9f6f97a2190f.zip
Modified @makehomun
Using -1 will now revive a dead homun (finally, it now makes sense >_>) Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c18
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.