diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-19 04:10:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-28 04:40:43 +0300 |
commit | eac9c04d28fb71757efb1d6414ebfed5a832b5ca (patch) | |
tree | e69f334ea26f2650d24f6a965bee6b7a90b4df47 /src/map/clif.c | |
parent | a7285e774dac19e47c9e9adca3cc97212ed30c59 (diff) | |
download | hercules-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/clif.c')
-rw-r--r-- | src/map/clif.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index e01bef5c9..b29fde76b 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -21575,6 +21575,17 @@ static void clif_overweight_percent(struct map_session_data *sd) #endif } +static void clif_parse_changeDress(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +/// 0ae8 <packet len>.W +static void clif_parse_changeDress(int fd, struct map_session_data *sd) +{ + const char commandname[] = "changedress"; + char command[sizeof commandname + 3] = ""; // '@' command + ' ' + NUL + + sprintf(command, "%c%s ", atcommand->at_symbol, commandname); + atcommand->exec(fd, sd, command, true); +} + /*========================================== * Main client packet processing function *------------------------------------------*/ @@ -22613,6 +22624,7 @@ void clif_defaults(void) clif->pMoveItem = clif_parse_MoveItem; clif->p_cz_blocking_play_cancel = clif_parse_cz_blocking_play_cancel; clif->overweight_percent = clif_overweight_percent; + clif->pChangeDress = clif_parse_changeDress; /* dull */ clif->pDull = clif_parse_dull; /* BGQueue */ |