diff options
author | Haru <haru@dotalux.com> | 2020-02-09 23:10:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-09 23:10:59 +0100 |
commit | 1a0619fcedf573c7004489470f169e112fa1bb62 (patch) | |
tree | 47b502114376a2a8cd59604731703b93504fb4e5 /src/map/atcommand.c | |
parent | 66b624165ba2e7c868b38081230a61691be447df (diff) | |
parent | 7510db3f7b8990bbbcebcb1c3de8d20f8f27d011 (diff) | |
download | hercules-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.c | 11 |
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; } |