summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-12-17 16:10:19 +0530
committerHaru <haru@dotalux.com>2016-01-05 13:09:15 +0100
commit0c458a4976ea392a71ccfa8d86f2ebf86d03e1b4 (patch)
treebb90a52d78795f17f6268f815a77f66d77044b8f /src/map/atcommand.c
parent987b90508e7e6528eca2983416ac96cc1452ed61 (diff)
downloadhercules-0c458a4976ea392a71ccfa8d86f2ebf86d03e1b4.tar.gz
hercules-0c458a4976ea392a71ccfa8d86f2ebf86d03e1b4.tar.bz2
hercules-0c458a4976ea392a71ccfa8d86f2ebf86d03e1b4.tar.xz
hercules-0c458a4976ea392a71ccfa8d86f2ebf86d03e1b4.zip
Added Support for BodyStyle
Closes #974 as merged
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index e18b81f44..ffd09caeb 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1703,6 +1703,32 @@ ACMD(model)
}
/*==========================================
+ * @bodystyle [Rytech]
+ *------------------------------------------*/
+ACMD(bodystyle)
+{
+ int body_style = 0;
+
+ memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+ if (!*message || 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;
+ }
+
+ 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.
+ } else {
+ clif->message(fd, msg_txt(37)); // An invalid number was specified.
+ return false;
+ }
+
+ return true;
+}
+
+/*==========================================
* @dye && @ccolor
*------------------------------------------*/
ACMD(dye)
@@ -5484,7 +5510,7 @@ ACMD(divorce)
ACMD(changelook)
{
int i, j = 0, k = 0;
- int pos[7] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES,LOOK_ROBE };
+ int pos[8] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES,LOOK_ROBE,LOOK_BODY2 };
if((i = sscanf(message, "%12d %12d", &j, &k)) < 1) {
clif->message(fd, msg_fd(fd,1177)); // Usage: @changelook {<position>} <view id>
@@ -9648,6 +9674,7 @@ void atcommand_basecommands(void) {
ACMD_DEF(skdebug),
ACMD_DEF(cddebug),
ACMD_DEF(lang),
+ ACMD_DEF(bodystyle),
};
int i;