summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/map/battle/client.conf8
-rw-r--r--db/constants.conf3
-rw-r--r--src/common/mmo.h3
-rw-r--r--src/map/atcommand.c53
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/clif.c40
-rw-r--r--src/map/script.c1
-rw-r--r--src/map/status.c59
-rw-r--r--src/map/status.h4
10 files changed, 111 insertions, 64 deletions
diff --git a/conf/map/battle/client.conf b/conf/map/battle/client.conf
index c3409b578..32f1324be 100644
--- a/conf/map/battle/client.conf
+++ b/conf/map/battle/client.conf
@@ -126,6 +126,14 @@ summer_ignorepalette: false
// Set this to true if your cloth palettes pack doesn't has Hanbok palettes (or has less than the other jobs)
hanbok_ignorepalette: false
+// Do not display cloth colors for the Oktoberfest costume?
+// Set this to true if your cloth palettes pack doesn't has Oktoberfest palettes (or has less than the other jobs)
+oktoberfest_ignorepalette: false
+
+// Do not display cloth colors for the Summer 2 costume?
+// Set this to true if your cloth palettes pack doesn't has Summer 2 palettes (or has less than the other jobs)
+summer2_ignorepalette: false
+
// Show Hercules version to users when the login?
display_version: false
diff --git a/db/constants.conf b/db/constants.conf
index d108e0976..dd280612c 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -1394,6 +1394,9 @@ constants_db: {
SC_TUNAPARTY: 649
SC_SHRIMP: 650
SC_FRESHSHRIMP: 651
+
+ // Summer 2 Costume
+ SC_DRESS_UP: 652
comment__: "Emotes"
e_gasp: 0
diff --git a/src/common/mmo.h b/src/common/mmo.h
index b3069b27c..7bd5b7c06 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -436,6 +436,7 @@ enum {
OPTION_DRAGON5 = 0x04000000,
OPTION_HANBOK = 0x08000000,
OPTION_OKTOBERFEST = 0x10000000,
+ OPTION_SUMMER2 = 0x20000000,
#ifndef NEW_CARTS
OPTION_CART1 = 0x00000008,
OPTION_CART2 = 0x00000080,
@@ -447,7 +448,7 @@ enum {
#endif
// compound constants
OPTION_DRAGON = OPTION_DRAGON1|OPTION_DRAGON2|OPTION_DRAGON3|OPTION_DRAGON4|OPTION_DRAGON5,
- OPTION_COSTUME = OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER|OPTION_HANBOK|OPTION_OKTOBERFEST,
+ OPTION_COSTUME = OPTION_WEDDING | OPTION_XMAS | OPTION_SUMMER | OPTION_HANBOK | OPTION_OKTOBERFEST | OPTION_SUMMER2,
};
struct s_skill {
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)
diff --git a/src/map/battle.c b/src/map/battle.c
index 921e8bbd3..11425d4a9 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7041,6 +7041,8 @@ static const struct battle_data {
{ "xmas_ignorepalette", &battle_config.xmas_ignorepalette, 0, 0, 1, },
{ "summer_ignorepalette", &battle_config.summer_ignorepalette, 0, 0, 1, },
{ "hanbok_ignorepalette", &battle_config.hanbok_ignorepalette, 0, 0, 1, },
+ { "oktoberfest_ignorepalette", &battle_config.oktoberfest_ignorepalette, 0, 0, 1, },
+ { "summer2_ignorepalette", &battle_config.summer2_ignorepalette, 0, 0, 1, },
{ "natural_healhp_interval", &battle_config.natural_healhp_interval, 6000, NATURAL_HEAL_INTERVAL, INT_MAX, },
{ "natural_healsp_interval", &battle_config.natural_healsp_interval, 8000, NATURAL_HEAL_INTERVAL, INT_MAX, },
{ "natural_heal_skill_interval", &battle_config.natural_heal_skill_interval, 10000, NATURAL_HEAL_INTERVAL, INT_MAX, },
diff --git a/src/map/battle.h b/src/map/battle.h
index e698ccb8f..a73c6dc44 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -245,6 +245,8 @@ struct Battle_Config {
int xmas_ignorepalette; // [Valaris]
int summer_ignorepalette; // [Zephyrus]
int hanbok_ignorepalette;
+ int oktoberfest_ignorepalette;
+ int summer2_ignorepalette;
int natural_healhp_interval;
int natural_healsp_interval;
int natural_heal_skill_interval;
diff --git a/src/map/clif.c b/src/map/clif.c
index f1400a5d4..e70857ab6 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3194,31 +3194,31 @@ void clif_changelook(struct block_list *bl,int type,int val)
vd->shield = val;
break;
case LOOK_BASE:
- if( !sd ) break;
+ if (sd == NULL)
+ break;
- if ( val == INVISIBLE_CLASS ) /* nothing to change look */
+ if (val == INVISIBLE_CLASS) /* nothing to change look */
return;
- if( sd->sc.option&OPTION_COSTUME )
+ if (sd->sc.option & OPTION_COSTUME)
vd->weapon = vd->shield = 0;
- if( !vd->cloth_color )
+ if (!vd->cloth_color)
break;
- if (sd->sc.option&OPTION_WEDDING && battle_config.wedding_ignorepalette)
+ if ((sd->sc.option & OPTION_WEDDING) != 0 && battle_config.wedding_ignorepalette == true)
+ vd->cloth_color = 0;
+ if ((sd->sc.option & OPTION_XMAS) != 0 && battle_config.xmas_ignorepalette == true)
vd->cloth_color = 0;
- if (sd->sc.option&OPTION_XMAS && battle_config.xmas_ignorepalette)
+ if ((sd->sc.option & OPTION_SUMMER) != 0 && battle_config.summer_ignorepalette == true)
vd->cloth_color = 0;
- if (sd->sc.option&OPTION_SUMMER && battle_config.summer_ignorepalette)
+ if ((sd->sc.option & OPTION_HANBOK) != 0 && battle_config.hanbok_ignorepalette == true)
vd->cloth_color = 0;
- if (sd->sc.option&OPTION_HANBOK && battle_config.hanbok_ignorepalette)
+ if ((sd->sc.option & OPTION_OKTOBERFEST) != 0 && battle_config.oktoberfest_ignorepalette == true)
vd->cloth_color = 0;
- if (sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */)
+ if ((sd->sc.option & OPTION_SUMMER2) != 0 && battle_config.summer2_ignorepalette == true)
vd->cloth_color = 0;
- if (vd->body_style && (
- sd->sc.option&OPTION_WEDDING || sd->sc.option&OPTION_XMAS ||
- sd->sc.option&OPTION_SUMMER || sd->sc.option&OPTION_HANBOK ||
- sd->sc.option&OPTION_OKTOBERFEST))
+ if (vd->body_style != 0 && (sd->sc.option & OPTION_COSTUME) != 0)
vd->body_style = 0;
break;
case LOOK_HAIR:
@@ -3237,16 +3237,18 @@ void clif_changelook(struct block_list *bl,int type,int val)
vd->hair_color = val;
break;
case LOOK_CLOTHES_COLOR:
- if( val && sd ) {
- if( sd->sc.option&OPTION_WEDDING && battle_config.wedding_ignorepalette )
+ if (val && sd != NULL) {
+ if ((sd->sc.option & OPTION_WEDDING) != 0 && battle_config.wedding_ignorepalette == true)
+ val = 0;
+ if ((sd->sc.option & OPTION_XMAS) != 0 && battle_config.xmas_ignorepalette == true)
val = 0;
- if( sd->sc.option&OPTION_XMAS && battle_config.xmas_ignorepalette )
+ if ((sd->sc.option & OPTION_SUMMER) != 0 && battle_config.summer_ignorepalette == true)
val = 0;
- if( sd->sc.option&OPTION_SUMMER && battle_config.summer_ignorepalette )
+ if ((sd->sc.option & OPTION_HANBOK) != 0 && battle_config.hanbok_ignorepalette == true)
val = 0;
- if( sd->sc.option&OPTION_HANBOK && battle_config.hanbok_ignorepalette )
+ if ((sd->sc.option & OPTION_OKTOBERFEST) != 0 && battle_config.oktoberfest_ignorepalette == true)
val = 0;
- if( sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */ )
+ if ((sd->sc.option & OPTION_SUMMER2) != 0 && battle_config.summer2_ignorepalette == true)
val = 0;
}
vd->cloth_color = val;
diff --git a/src/map/script.c b/src/map/script.c
index 310722061..b0922e3f8 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -23797,6 +23797,7 @@ void script_hardcoded_constants(void)
script->set_constant("Option_Dragon5",OPTION_DRAGON5,false, false);
script->set_constant("Option_Hanbok",OPTION_HANBOK,false, false);
script->set_constant("Option_Oktoberfest",OPTION_OKTOBERFEST,false, false);
+ script->set_constant("Option_Summer2", OPTION_SUMMER2, false, false);
script->constdb_comment("status option compounds");
script->set_constant("Option_Dragon",OPTION_DRAGON,false, false);
diff --git a/src/map/status.c b/src/map/status.c
index 506c45ddf..c3e5a3f40 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1000,6 +1000,7 @@ void initChangeTables(void)
status->dbs->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
// Costumes
+ status->dbs->IconChangeTable[SC_DRESS_UP] = SI_DRESS_UP;
status->dbs->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR;
status->dbs->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR;
status->dbs->IconChangeTable[SC_STRANGELIGHTS] = SI_STRANGELIGHTS;
@@ -1178,6 +1179,7 @@ void initChangeTables(void)
status->dbs->ChangeFlagTable[SC_MVPCARD_ORCLORD] |= SCB_ALL;
// Costumes
+ status->dbs->ChangeFlagTable[SC_DRESS_UP] |= SCB_NONE;
status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
status->dbs->ChangeFlagTable[SC_STRANGELIGHTS] |= SCB_NONE;
@@ -6873,23 +6875,20 @@ void status_set_viewdata(struct block_list *bl, int class_)
sd->vd.sex = sd->status.sex;
if (sd->vd.cloth_color) {
- if (sd->sc.option&OPTION_WEDDING && battle_config.wedding_ignorepalette)
- sd->vd.cloth_color = 0;
- if (sd->sc.option&OPTION_XMAS && battle_config.xmas_ignorepalette)
- sd->vd.cloth_color = 0;
- if (sd->sc.option&OPTION_SUMMER && battle_config.summer_ignorepalette)
- sd->vd.cloth_color = 0;
- if (sd->sc.option&OPTION_HANBOK && battle_config.hanbok_ignorepalette)
- sd->vd.cloth_color = 0;
- if (sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */)
+ if ((sd->sc.option & OPTION_WEDDING) != 0 && battle_config.wedding_ignorepalette == true)
+ sd->vd.cloth_color = 0;
+ if ((sd->sc.option & OPTION_XMAS) != 0 && battle_config.xmas_ignorepalette == true)
+ sd->vd.cloth_color = 0;
+ if ((sd->sc.option & OPTION_SUMMER) != 0 && battle_config.summer_ignorepalette == true)
+ sd->vd.cloth_color = 0;
+ if ((sd->sc.option & OPTION_HANBOK) != 0 && battle_config.hanbok_ignorepalette == true)
+ sd->vd.cloth_color = 0;
+ if ((sd->sc.option & OPTION_OKTOBERFEST) != 0 && battle_config.oktoberfest_ignorepalette == true)
+ sd->vd.cloth_color = 0;
+ if ((sd->sc.option & OPTION_SUMMER2) != 0 && battle_config.summer2_ignorepalette == true)
sd->vd.cloth_color = 0;
}
- if (sd->vd.body_style
- && (sd->sc.option&OPTION_WEDDING
- || sd->sc.option&OPTION_XMAS
- || sd->sc.option&OPTION_SUMMER
- || sd->sc.option&OPTION_HANBOK
- || sd->sc.option&OPTION_OKTOBERFEST))
+ if (sd->vd.body_style != 0 && (sd->sc.option & OPTION_COSTUME) != 0)
sd->vd.body_style = 0;
} else if (vd != NULL) {
memcpy(&sd->vd, vd, sizeof(struct view_data));
@@ -8475,8 +8474,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_SUMMER:
case SC_HANBOK:
case SC_OKTOBERFEST:
- if (!vd) return 0;
- //Store previous values as they could be removed.
+ case SC_DRESS_UP:
+ if (vd == NULL)
+ return 0;
+ // Store previous values as they could be removed.
unit->stop_attack(bl);
break;
case SC_NOCHAT:
@@ -9871,19 +9872,21 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
return 0;
}
}
- } else { //Special considerations when loading SC data.
- switch( type ) {
+ } else { // Special considerations when loading SC data.
+ switch (type) {
case SC_WEDDING:
case SC_XMAS:
case SC_SUMMER:
case SC_HANBOK:
case SC_OKTOBERFEST:
- if( !vd ) break;
+ case SC_DRESS_UP:
+ if (vd == NULL)
+ break;
clif->changelook(bl, LOOK_BASE, vd->class);
- clif->changelook(bl,LOOK_WEAPON,0);
- clif->changelook(bl,LOOK_SHIELD,0);
- clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color);
- clif->changelook(bl,LOOK_BODY2,0);
+ clif->changelook(bl, LOOK_WEAPON, 0);
+ clif->changelook(bl, LOOK_SHIELD, 0);
+ clif->changelook(bl, LOOK_CLOTHES_COLOR, vd->cloth_color);
+ clif->changelook(bl, LOOK_BODY2, 0);
break;
case SC_KAAHI:
val4 = INVALID_TIMER;
@@ -10266,6 +10269,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
sc->option |= OPTION_OKTOBERFEST;
opt_flag |= 0x4;
break;
+ case SC_DRESS_UP:
+ sc->option |= OPTION_SUMMER2;
+ opt_flag |= 0x4;
+ break;
case SC__FEINTBOMB_MASTER:
sc->option |= OPTION_INVISIBLE;
opt_flag |= 0x4;
@@ -11074,6 +11081,10 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
sc->option &= ~OPTION_OKTOBERFEST;
opt_flag |= 0x4;
break;
+ case SC_DRESS_UP:
+ sc->option &= ~OPTION_SUMMER2;
+ opt_flag |= 0x4;
+ break;
case SC__FEINTBOMB_MASTER:
sc->option &= ~OPTION_INVISIBLE;
opt_flag |= 0x4;
diff --git a/src/map/status.h b/src/map/status.h
index 06e7e07b8..1496429a8 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -840,6 +840,8 @@ typedef enum sc_type {
SC_TUNAPARTY,
SC_SHRIMP, // 650
SC_FRESHSHRIMP,
+
+ SC_DRESS_UP,
#ifndef SC_MAX
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
#endif
@@ -1722,7 +1724,7 @@ enum si_type {
//SI_SUMMEREVENT04 = 853,
//SI_SUMMEREVENT05 = 854,
//SI_MINIGAME_ROULETTE_BONUS_ITEM = 855,
- //SI_DRESS_UP = 856,
+ SI_DRESS_UP = 856,
SI_MAPLE_FALLS = 857,
//SI_ALL_NIFLHEIM_RECALL = 858,
//SI_ = 859,