summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-02-09 23:10:59 +0100
committerGitHub <noreply@github.com>2020-02-09 23:10:59 +0100
commit1a0619fcedf573c7004489470f169e112fa1bb62 (patch)
tree47b502114376a2a8cd59604731703b93504fb4e5 /src/map/atcommand.c
parent66b624165ba2e7c868b38081230a61691be447df (diff)
parent7510db3f7b8990bbbcebcb1c3de8d20f8f27d011 (diff)
downloadhercules-1a0619fcedf573c7004489470f169e112fa1bb62.tar.gz
hercules-1a0619fcedf573c7004489470f169e112fa1bb62.tar.bz2
hercules-1a0619fcedf573c7004489470f169e112fa1bb62.tar.xz
hercules-1a0619fcedf573c7004489470f169e112fa1bb62.zip
Merge pull request #2586 from Asheraf/madostatueffect
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 c9191d27d..707522423 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;
}