summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 03:06:00 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 03:06:00 +0200
commit3dd482367675292233bf034bc8a38b2ab46b0aa3 (patch)
tree4698347fac8d0cce50697baee43d2912bd6b97e8
parent0f8a2df4dd40d522a69260b4d110d0ea2c14ba2a (diff)
downloadhercules-3dd482367675292233bf034bc8a38b2ab46b0aa3.tar.gz
hercules-3dd482367675292233bf034bc8a38b2ab46b0aa3.tar.bz2
hercules-3dd482367675292233bf034bc8a38b2ab46b0aa3.tar.xz
hercules-3dd482367675292233bf034bc8a38b2ab46b0aa3.zip
Extend guild_notice_changemap battle flag with option for login
-rw-r--r--conf/map/battle/guild.conf12
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/clif.c6
3 files changed, 11 insertions, 9 deletions
diff --git a/conf/map/battle/guild.conf b/conf/map/battle/guild.conf
index 781f6555b..204c295c3 100644
--- a/conf/map/battle/guild.conf
+++ b/conf/map/battle/guild.conf
@@ -59,11 +59,13 @@ require_glory_guild: false
// Default is 3
max_guild_alliance: 3
-// When to re-display the guild notice
-// Upon teleporting (regardless of changing maps): 2 (official)
-// Upon changing maps: 1
-// Do not re-display: 0 (disabled)
-guild_notice_changemap: 2
+// When to display the guild notice?
+// 0x0 - Never display guild notice.
+// 0x1 - Display guild notice upon login.
+// 0x2 - Display guild notice upon map change.
+// 0x4 - Display guild notice upon teleporting (regardless of changing maps).
+// Default: 0x7 (Official behavior.)
+guild_notice_changemap: 0x7
// Can guild members invite/expel members inside guild castles in WoE/GvG? (Note 1)
// default: false
diff --git a/src/map/battle.c b/src/map/battle.c
index dc2535052..ed5aa4cb9 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7383,7 +7383,7 @@ static const struct battle_data {
{ "packet_obfuscation", &battle_config.packet_obfuscation, 1, 0, 3, },
{ "client_accept_chatdori", &battle_config.client_accept_chatdori, 0, 0, INT_MAX, },
{ "snovice_call_type", &battle_config.snovice_call_type, 0, 0, 1, },
- { "guild_notice_changemap", &battle_config.guild_notice_changemap, 2, 0, 2, },
+ { "guild_notice_changemap", &battle_config.guild_notice_changemap, 7, 0, 7, },
{ "features/banking", &battle_config.feature_banking, 1, 0, 1, },
{ "features/auction", &battle_config.feature_auction, 0, 0, 2, },
{ "idletime_criteria", &battle_config.idletime_criteria, 0x25, 1, INT_MAX, },
diff --git a/src/map/clif.c b/src/map/clif.c
index a580d6464..9eba9f4b4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11030,9 +11030,9 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
if (sd->guild != NULL) {
// Show guild notice.
- if ((battle_config.guild_notice_changemap == 1 && change_map)
- || battle_config.guild_notice_changemap == 2
- || first_time) {
+ if (((battle_config.guild_notice_changemap & 0x1) != 0 && first_time)
+ || ((battle_config.guild_notice_changemap & 0x2) != 0 && !first_time && change_map)
+ || (battle_config.guild_notice_changemap & 0x4) != 0) {
clif->guild_notice(sd, sd->guild);
}