summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c53
1 files changed, 34 insertions, 19 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 13eab74ec..9f37a754f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9264,7 +9264,12 @@ ACMD(searchstore){
searchstore->open(sd, 99, val);
return true;
}
-ACMD(costume){
+
+/*==========================================
+* @costume
+*------------------------------------------*/
+ACMD(costume)
+{
const char* names[] = {
"Wedding",
"Xmas",
@@ -9273,6 +9278,9 @@ ACMD(costume){
#if PACKETVER >= 20131218
"Oktoberfest",
#endif
+#if PACKETVER >= 20141022
+ "Summer2",
+#endif
};
const int name2id[] = {
SC_WEDDING,
@@ -9282,41 +9290,47 @@ ACMD(costume){
#if PACKETVER >= 20131218
SC_OKTOBERFEST,
#endif
+#if PACKETVER >= 20141022
+ SC_DRESS_UP,
+#endif
};
unsigned short k = 0, len = ARRAYLENGTH(names);
if (!*message) {
- for( k = 0; k < len; k++ ) {
- if( sd->sc.data[name2id[k]] ) {
- safesnprintf(atcmd_output, sizeof(atcmd_output),msg_fd(fd,1473),names[k]);//Costume '%s' removed.
- clif->message(sd->fd,atcmd_output);
- status_change_end(&sd->bl,name2id[k],INVALID_TIMER);
+ for (k = 0; k < len; k++) {
+ if (sd->sc.data[name2id[k]]) {
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1473), names[k]); // Costume '%s' removed.
+ clif->message(sd->fd, atcmd_output);
+ status_change_end(&sd->bl, name2id[k], INVALID_TIMER);
return true;
}
}
- clif->message(sd->fd,msg_fd(fd,1472));
- for( k = 0; k < len; k++ ) {
- safesnprintf(atcmd_output, sizeof(atcmd_output),msg_fd(fd,1471),names[k]);//-- %s
- clif->message(sd->fd,atcmd_output);
+
+ clif->message(sd->fd, msg_fd(fd, 1472)); // - Available Costumes
+
+ for (k = 0; k < len; k++) {
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1471), names[k]); //-- %s
+ clif->message(sd->fd, atcmd_output);
}
return false;
}
- 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.
- clif->message(sd->fd,atcmd_output);
+ 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.
+ clif->message(sd->fd, atcmd_output);
return false;
}
}
- for( k = 0; k < len; k++ ) {
- if( strcmpi(message,names[k]) == 0 )
+ for (k = 0; k < len; k++) {
+ if (strcmpi(message,names[k]) == 0)
break;
}
- if( k == len ) {
- safesnprintf(atcmd_output, sizeof(atcmd_output),msg_fd(fd,1469),message);// '%s' is not a known costume
- clif->message(sd->fd,atcmd_output);
+
+ if (k == len) {
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1469), message); // '%s' is not a known costume
+ clif->message(sd->fd, atcmd_output);
return false;
}
@@ -9324,6 +9338,7 @@ ACMD(costume){
return true;
}
+
/* for debugging purposes (so users can easily provide us with debug info) */
/* should be trashed as soon as its no longer necessary */
ACMD(skdebug)