diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 8 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 8 | ||||
-rw-r--r-- | src/map/clif.h | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 64fda033f..77bb99730 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7321,6 +7321,7 @@ static const struct battle_data { { "player_warp_keep_direction", &battle_config.player_warp_keep_direction, 0, 0, 1, }, { "atcommand_levelup_events", &battle_config.atcommand_levelup_events, 0, 0, 1, }, { "max_summoner_parameter", &battle_config.max_summoner_parameter, 120, 10, 10000, }, + { "mvp_exp_reward_message", &battle_config.mvp_exp_reward_message, 0, 0, 1, }, }; #ifndef STATS_OPT_OUT /** @@ -7599,6 +7600,13 @@ void battle_adjust_conf(void) { } #endif +#if PACKETVER < 20131223 + if (battle_config.mvp_exp_reward_message) { + ShowWarning("conf/map/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 + #ifndef CELL_NOSTACK if (battle_config.custom_cell_stack_limit != 1) ShowWarning("Battle setting 'custom_cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n"); diff --git a/src/map/battle.h b/src/map/battle.h index c55d5ef19..b7bde1aa9 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -547,6 +547,7 @@ struct Battle_Config { int atcommand_levelup_events; // Enable atcommands trigger level up events for NPCs int max_summoner_parameter; // Summoner Max Stats + int mvp_exp_reward_message; }; /* criteria for battle_config.idletime_critera */ diff --git a/src/map/clif.c b/src/map/clif.c index 6897c357a..597a890ae 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7256,6 +7256,13 @@ void clif_mvp_item(struct map_session_data *sd,int nameid) /// 010b <exp>.L void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { +#if PACKETVER >= 20131223 // Kro removed this packet [Napster] + if (battle_config.mvp_exp_reward_message) { + char e_msg[CHAT_SIZE_MAX]; + sprintf(e_msg, msg_txt(855), exp); + clif->messagecolor_self(sd->fd, COLOR_CYAN, e_msg); // Congratulations! You are the MVP! Your reward EXP Points are %u !! + } +#else int fd; nullpo_retv(sd); @@ -7265,6 +7272,7 @@ void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) WFIFOW(fd,0)=0x10b; WFIFOL(fd,2)=cap_value(exp,0,INT32_MAX); WFIFOSET(fd,packet_len(0x10b)); +#endif } /// Dropped MVP item reward message (ZC_THROW_MVPITEM). diff --git a/src/map/clif.h b/src/map/clif.h index aefba5974..c3a42372a 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -65,6 +65,7 @@ struct view_data; #define MAX_ROULETTE_COLUMNS 9 /** client-defined value **/ #define RGB2BGR(c) (((c) & 0x0000FF) << 16 | ((c) & 0x00FF00) | ((c) & 0xFF0000) >> 16) +#define COLOR_CYAN 0x00ffffU #define COLOR_RED 0xff0000U #define COLOR_GREEN 0x00ff00U #define COLOR_WHITE 0xffffffU |