diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index afdf180d5..9f37a754f 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1714,7 +1714,21 @@ ACMD(bodystyle) memset(atcmd_output, '\0', sizeof(atcmd_output)); - if (!*message || sscanf(message, "%d", &body_style) < 1) { + if ((sd->job & MAPID_THIRDMASK) != MAPID_GUILLOTINE_CROSS + && (sd->job & MAPID_THIRDMASK) != MAPID_GENETIC + && (sd->job & MAPID_THIRDMASK) != MAPID_MECHANIC + && (sd->job & MAPID_THIRDMASK) != MAPID_ROYAL_GUARD + && (sd->job & MAPID_THIRDMASK) != MAPID_ARCH_BISHOP + && (sd->job & MAPID_THIRDMASK) != MAPID_RANGER + && (sd->job & MAPID_THIRDMASK) != MAPID_WARLOCK + && (sd->job & MAPID_THIRDMASK) != MAPID_SHADOW_CHASER + && (sd->job & MAPID_THIRDMASK) != MAPID_MINSTRELWANDERER + ) { + clif->message(fd, msg_fd(fd, 35)); // This job has no alternate body styles. + return false; + } + + if (*message == '\0' || sscanf(message, "%d", &body_style) < 1) { sprintf(atcmd_output, "Please, enter a body style (usage: @bodystyle <body ID: %d-%d>).", MIN_BODY_STYLE, MAX_BODY_STYLE); clif->message(fd, atcmd_output); return false; @@ -1722,9 +1736,9 @@ ACMD(bodystyle) if (body_style >= MIN_BODY_STYLE && body_style <= MAX_BODY_STYLE) { pc->changelook(sd, LOOK_BODY2, body_style); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_fd(fd, 36)); // Appearence changed. } else { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd, 37)); // An invalid number was specified. return false; } @@ -8420,22 +8434,24 @@ ACMD(charcommands) return true; } -/* for new mounts */ +/* For new mounts */ ACMD(cashmount) { if (pc_hasmount(sd)) { - clif->message(fd, msg_fd(fd,1476)); // You are already mounting something else + clif->message(fd, msg_fd(fd, 1476)); // You are already mounting something else return false; } - clif->message(sd->fd,msg_fd(fd,1362)); // NOTICE: If you crash with mount your LUA is outdated. + clif->message(sd->fd, msg_fd(fd, 1362)); // NOTICE: If you crash with mount your LUA is outdated. + if (!sd->sc.data[SC_ALL_RIDING]) { - clif->message(sd->fd,msg_fd(fd,1363)); // You have mounted. - sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, 25, INFINITE_DURATION); + clif->message(sd->fd, msg_fd(fd, 1363)); // You have mounted. + sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, battle_config.boarding_halter_speed, INFINITE_DURATION); } else { - clif->message(sd->fd,msg_fd(fd,1364)); // You have released your mount. + clif->message(sd->fd, msg_fd(fd, 1364)); // You have released your mount. status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); } + return true; } |