summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2017-04-19 23:25:53 +0800
committerJedzkie <jedzkie13@rocketmail.com>2017-04-19 23:37:08 +0800
commitc22bc45868e8ea2b7ef904848d178caeaa6b379c (patch)
tree32edebf9506cd0dad0612cef0ebcf8a2007a4e1d
parent5802b22439441be1914ae9024d6ce06d51c0210f (diff)
downloadhercules-c22bc45868e8ea2b7ef904848d178caeaa6b379c.tar.gz
hercules-c22bc45868e8ea2b7ef904848d178caeaa6b379c.tar.bz2
hercules-c22bc45868e8ea2b7ef904848d178caeaa6b379c.tar.xz
hercules-c22bc45868e8ea2b7ef904848d178caeaa6b379c.zip
Implemented Official Summer 2 Costume
Added summer2_ignorepalette configuration
-rw-r--r--conf/map/battle/client.conf4
-rw-r--r--db/constants.conf3
-rw-r--r--src/common/mmo.h3
-rw-r--r--src/map/atcommand.c6
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/script.c1
-rw-r--r--src/map/status.c17
-rw-r--r--src/map/status.h4
10 files changed, 42 insertions, 4 deletions
diff --git a/conf/map/battle/client.conf b/conf/map/battle/client.conf
index c3409b578..45f89ce9b 100644
--- a/conf/map/battle/client.conf
+++ b/conf/map/battle/client.conf
@@ -126,6 +126,10 @@ 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 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 79530e7d1..c0fe61d96 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..5e650e4e8 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 881e50497..4c746d4ca 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9257,6 +9257,9 @@ ACMD(costume){
#if PACKETVER >= 20131218
"Oktoberfest",
#endif
+#if PACKETVER >= 20141022
+ "Summer2",
+#endif
};
const int name2id[] = {
SC_WEDDING,
@@ -9266,6 +9269,9 @@ ACMD(costume){
#if PACKETVER >= 20131218
SC_OKTOBERFEST,
#endif
+#if PACKETVER >= 20141022
+ SC_DRESS_UP,
+#endif
};
unsigned short k = 0, len = ARRAYLENGTH(names);
diff --git a/src/map/battle.c b/src/map/battle.c
index 63252caf7..a43fa11c8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7042,6 +7042,7 @@ 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, },
+ { "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 806b07a20..2bc9f5b2e 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -246,6 +246,7 @@ struct Battle_Config {
int xmas_ignorepalette; // [Valaris]
int summer_ignorepalette; // [Zephyrus]
int hanbok_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 5939222e9..3bf77baef 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3215,10 +3215,12 @@ void clif_changelook(struct block_list *bl,int type,int val)
vd->cloth_color = 0;
if (sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */)
vd->cloth_color = 0;
+ if (sd->sc.option&OPTION_SUMMER2 && battle_config.summer2_ignorepalette)
+ 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))
+ sd->sc.option&OPTION_OKTOBERFEST || sd->sc.option&OPTION_SUMMER2))
vd->body_style = 0;
break;
case LOOK_HAIR:
@@ -3248,6 +3250,8 @@ void clif_changelook(struct block_list *bl,int type,int val)
val = 0;
if( sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */ )
val = 0;
+ if (sd->sc.option&OPTION_SUMMER2 && battle_config.summer2_ignorepalette)
+ val = 0;
}
vd->cloth_color = val;
break;
diff --git a/src/map/script.c b/src/map/script.c
index 8604b62f7..bea0fe47c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -22102,6 +22102,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 d8fb9a350..529ab1c02 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;
@@ -6883,13 +6885,16 @@ void status_set_viewdata(struct block_list *bl, int class_)
sd->vd.cloth_color = 0;
if (sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */)
sd->vd.cloth_color = 0;
+ if (sd->sc.option&OPTION_SUMMER2 && battle_config.summer2_ignorepalette)
+ 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))
+ || sd->sc.option&OPTION_OKTOBERFEST
+ || sd->sc.option&OPTION_SUMMER2))
sd->vd.body_style = 0;
} else if (vd != NULL) {
memcpy(&sd->vd, vd, sizeof(struct view_data));
@@ -8493,6 +8498,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_SUMMER:
case SC_HANBOK:
case SC_OKTOBERFEST:
+ case SC_DRESS_UP:
if (!vd) return 0;
//Store previous values as they could be removed.
unit->stop_attack(bl);
@@ -9896,6 +9902,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_SUMMER:
case SC_HANBOK:
case SC_OKTOBERFEST:
+ case SC_DRESS_UP:
if( !vd ) break;
clif->changelook(bl, LOOK_BASE, vd->class);
clif->changelook(bl,LOOK_WEAPON,0);
@@ -10284,6 +10291,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;
@@ -11092,6 +11103,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 6f68c36c3..17585e6a1 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,