summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-19 04:10:48 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-28 04:40:43 +0300
commiteac9c04d28fb71757efb1d6414ebfed5a832b5ca (patch)
treee69f334ea26f2650d24f6a965bee6b7a90b4df47 /src/map/atcommand.c
parenta7285e774dac19e47c9e9adca3cc97212ed30c59 (diff)
downloadhercules-eac9c04d28fb71757efb1d6414ebfed5a832b5ca.tar.gz
hercules-eac9c04d28fb71757efb1d6414ebfed5a832b5ca.tar.bz2
hercules-eac9c04d28fb71757efb1d6414ebfed5a832b5ca.tar.xz
hercules-eac9c04d28fb71757efb1d6414ebfed5a832b5ca.zip
Add support for chat commands /changedress and /nocosplay for remove costumes
Also add at command for remove costumes @changedress and @nocosplay. Thanks @Lemongrass3110 and @Everade.
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 52bf64e87..bedb58478 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9472,6 +9472,8 @@ ACMD(costume)
};
unsigned short k = 0, len = ARRAYLENGTH(names);
+ bool isChangeDress = (strcmpi(info->command, "changedress") == 0 || strcmpi(info->command, "nocosplay") == 0);
+
if (!*message) {
for (k = 0; k < len; k++) {
if (sd->sc.data[name2id[k]]) {
@@ -9482,6 +9484,8 @@ ACMD(costume)
}
}
+ if (isChangeDress)
+ return true;
clif->message(sd->fd, msg_fd(fd, 1472)); // - Available Costumes
for (k = 0; k < len; k++) {
@@ -9491,6 +9495,9 @@ ACMD(costume)
return false;
}
+ if (isChangeDress)
+ return true;
+
for (k = 0; k < len; k++) {
if (sd->sc.data[name2id[k]]) {
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1470), names[k]); // You're already with a '%s' costume, type '@costume' to remove it.
@@ -10014,6 +10021,8 @@ static void atcommand_basecommands(void)
ACMD_DEF(fontcolor),
ACMD_DEF(searchstore),
ACMD_DEF(costume),
+ ACMD_DEF2("changedress", costume),
+ ACMD_DEF2("nocosplay", costume),
ACMD_DEF(skdebug),
ACMD_DEF(cddebug),
ACMD_DEF(lang),