diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-06-22 03:00:22 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-06-22 03:00:22 +0200 |
commit | edad604582cbe6b17de7f19a958c38710f5cf9ab (patch) | |
tree | 290021773f1db8f2c02837287e36e844a5eecd78 /src | |
parent | 584f1e0797ae83fc760ec607ab134166f6426417 (diff) | |
download | hercules-edad604582cbe6b17de7f19a958c38710f5cf9ab.tar.gz hercules-edad604582cbe6b17de7f19a958c38710f5cf9ab.tar.bz2 hercules-edad604582cbe6b17de7f19a958c38710f5cf9ab.tar.xz hercules-edad604582cbe6b17de7f19a958c38710f5cf9ab.zip |
Add battle flag for rate modifier messages display
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 10 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 611154953..7d85bf645 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7431,6 +7431,7 @@ static const struct battle_data { { "ping_time", &battle_config.ping_time, 20, 0, 99999999, }, { "option_drop_max_loop", &battle_config.option_drop_max_loop, 10, 1, 100000, }, { "drop_connection_on_quit", &battle_config.drop_connection_on_quit, 0, 0, 1, }, + { "display_rate_messages", &battle_config.display_rate_messages, 1, 0, 7, }, { "features/enable_refinery_ui", &battle_config.enable_refinery_ui, 1, 0, 1, }, { "features/replace_refine_npcs", &battle_config.replace_refine_npcs, 1, 0, 1, }, { "batk_min_limit", &battle_config.batk_min, 0, 0, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index 55ee32445..a116506dd 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -590,6 +590,7 @@ struct Battle_Config { int option_drop_max_loop; int drop_connection_on_quit; + int display_rate_messages; int enable_refinery_ui; int replace_refine_npcs; diff --git a/src/map/clif.c b/src/map/clif.c index 03432c9e4..01f116cc7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10945,6 +10945,8 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) } } + bool change_map = (sd->state.changemap != 0); + if (sd->state.changemap != 0) { // Restore information that gets lost on map-change. #if PACKETVER >= 20070918 clif->partyinvitationstate(sd); @@ -10958,8 +10960,6 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) clif->zc_config(sd, CZ_CONFIG_HOMUNCULUS_AUTOFEEDING, false); #endif - clif->show_modifiers(sd); - bool flee_penalty = (battle_config.bg_flee_penalty != 100 || battle_config.gvg_flee_penalty != 100); bool is_gvg = (map_flag_gvg2(sd->state.pmap) || map_flag_gvg2(sd->bl.m)); bool is_bg = (map->list[sd->state.pmap].flag.battleground != 0 || map->list[sd->bl.m].flag.battleground != 0); @@ -11008,6 +11008,12 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) mail->clear(sd); clif->maptypeproperty2(&sd->bl, SELF); + if (((battle_config.display_rate_messages & 0x1) != 0 && first_time) + || ((battle_config.display_rate_messages & 0x2) != 0 && !first_time && change_map) + || (battle_config.display_rate_messages & 0x4) != 0) { + clif->show_modifiers(sd); + } + // Init guild aura. if (sd->state.gmaster_flag != 0) { guild->aura_refresh(sd, GD_LEADERSHIP, guild->checkskill(sd->guild, GD_LEADERSHIP)); |