summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2019-11-24 21:48:24 +0100
committerAsheraf <acheraf1998@gmail.com>2020-01-29 13:20:09 +0100
commite75ecacc2f3b2171a24df6abb089df4f3ecd9ebd (patch)
tree23d1b942aad72770b18aa71f3031f41fb407efda /src/map/atcommand.c
parentc03722679a01e5f181c2138565e95a6b0981a124 (diff)
downloadhercules-e75ecacc2f3b2171a24df6abb089df4f3ecd9ebd.tar.gz
hercules-e75ecacc2f3b2171a24df6abb089df4f3ecd9ebd.tar.bz2
hercules-e75ecacc2f3b2171a24df6abb089df4f3ecd9ebd.tar.xz
hercules-e75ecacc2f3b2171a24df6abb089df4f3ecd9ebd.zip
Implement support for switching madogear type
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3cd26079d..d6b6100be 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -4212,12 +4212,19 @@ ACMD(mount_peco)
return true;
}
if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) {
+ int mtype = MADO_ROBOT;
+ if (!*message)
+ sscanf(message, "%d", &mtype);
+ if (mtype < MADO_ROBOT || mtype >= MADO_MAX) {
+ clif->message(fd, msg_fd(fd, 173)); // Please enter a valid madogear type.
+ return false;
+ }
if (!pc_ismadogear(sd)) {
clif->message(sd->fd,msg_fd(fd,1123)); // You have mounted your Mado Gear.
- pc->setmadogear(sd, true);
+ pc->setmadogear(sd, true, (enum mado_type)mtype);
} else {
clif->message(sd->fd,msg_fd(fd,1124)); // You have released your Mado Gear.
- pc->setmadogear(sd, false);
+ pc->setmadogear(sd, false, (enum mado_type)mtype);
}
return true;
}