diff --git a/conf/battle/client.conf b/conf/battle/client.conf index 528a097530..f2e5e1be51 100644 --- a/conf/battle/client.conf +++ b/conf/battle/client.conf @@ -187,3 +187,8 @@ update_enemy_position: yes // When a player teleports, changes maps, or logs in, will they face the direction they were facing before warped? // Official: Disabled, players always face North. spawn_direction: no + +// Show the MVP EXP reward message for clients 2013-12-23cRagexe and newer? (Note 1) +// kRO removed the packet and this re-enables the message. +// Official: Disabled. +mvp_exp_reward_message: no diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index 9966b79de1..15f90d5b4f 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -742,7 +742,8 @@ 715: Point Shop List: '%s' 716: Your '%s' is now: %d -//717: Free +// MVP EXP reward message +717: Congratulations! You are the MVP! Your reward EXP Points are %d !! // @showrate 718: Personal rate information is not displayed now. diff --git a/src/map/battle.c b/src/map/battle.c index 87861f0dee..d8f9ff2305 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -8188,6 +8188,7 @@ static const struct _battle_data { { "exp_cost_redemptio", &battle_config.exp_cost_redemptio, 1, 0, 100, }, { "exp_cost_redemptio_limit", &battle_config.exp_cost_redemptio_limit, 5, 0, MAX_PARTY, }, { "exp_cost_inspiration", &battle_config.exp_cost_inspiration, 1, 0, 100, }, + { "mvp_exp_reward_message", &battle_config.mvp_exp_reward_message, 0, 0, 1, }, }; #ifndef STATS_OPT_OUT @@ -8422,6 +8423,13 @@ void battle_adjust_conf() } #endif +#if PACKETVER < 20131223 + if (battle_config.mvp_exp_reward_message) { + ShowWarning("conf/battle/client.conf MVP EXP reward message is enabled but it requires PACKETVER 2013-12-23 or newer, disabling...\n"); + battle_config.mvp_exp_reward_message = 0; + } +#endif + #if PACKETVER < 20141022 if (battle_config.feature_roulette) { ShowWarning("conf/battle/feature.conf roulette is enabled but it requires PACKETVER 2014-10-22 or newer, disabling...\n"); diff --git a/src/map/battle.h b/src/map/battle.h index 0a958ec53f..1068228ee4 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -605,6 +605,7 @@ extern struct Battle_Config int exp_cost_redemptio; int exp_cost_redemptio_limit; int exp_cost_inspiration; + int mvp_exp_reward_message; } battle_config; void do_init_battle(void); diff --git a/src/map/clif.c b/src/map/clif.c index c00bed7c29..31157fd80a 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7910,8 +7910,14 @@ void clif_mvp_item(struct map_session_data *sd, unsigned short nameid) /// MVP EXP reward message (ZC_MVP_GETTING_SPECIAL_EXP). /// 010b .L -void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) -{ +void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { +#if PACKETVER >= 20131223 // Kro remove this packet [Napster] + if (battle_config.mvp_exp_reward_message) { + char e_msg[CHAT_SIZE_MAX]; + sprintf(e_msg, msg_txt(sd, 717), exp); + clif_colormes(sd->fd, color_table[COLOR_CYAN], e_msg); // Congratulations! You are the MVP! Your reward EXP Points are %d !! + } +#else int fd; nullpo_retv(sd); @@ -7921,6 +7927,7 @@ void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) WFIFOW(fd,0)=0x10b; WFIFOL(fd,2)=min(exp,(unsigned int)INT32_MAX); WFIFOSET(fd,packet_len(0x10b)); +#endif } @@ -19639,6 +19646,7 @@ void do_init_clif(void) { "0xFF0000", "0xFFFFFF", "0xFFFF00", + "0x00FFFF", }; int i; /** diff --git a/src/map/clif.h b/src/map/clif.h index 77035f68ef..c7de7b21b1 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -964,6 +964,7 @@ enum clif_colors { COLOR_RED, COLOR_WHITE, COLOR_YELLOW, + COLOR_CYAN, COLOR_MAX }; unsigned long color_table[COLOR_MAX];