summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-09-09 19:00:01 -0300
committershennetsind <ind@henn.et>2013-09-09 19:00:01 -0300
commitdf1952d3ecaa5708dbe12e6f32137243c6bfdacb (patch)
tree2f48f194e777d4a6829796aa03cb96d19c5f930d
parent24ced6fcef1a95a2abd0c60b4fe90cbbc3aea268 (diff)
downloadhercules-df1952d3ecaa5708dbe12e6f32137243c6bfdacb.tar.gz
hercules-df1952d3ecaa5708dbe12e6f32137243c6bfdacb.tar.bz2
hercules-df1952d3ecaa5708dbe12e6f32137243c6bfdacb.tar.xz
hercules-df1952d3ecaa5708dbe12e6f32137243c6bfdacb.zip
Fixed Bug #7694
Implemented official guild notice behavior of re-displaying upon teleport, added conf/battle/guild.conf setting to modify this. Special Thanks to kyeme, Frost. http://hercules.ws/board/tracker/issue-7694-guild-notice/ Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--conf/battle/guild.conf6
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c6
4 files changed, 12 insertions, 2 deletions
diff --git a/conf/battle/guild.conf b/conf/battle/guild.conf
index cc22c327f..e9b025adb 100644
--- a/conf/battle/guild.conf
+++ b/conf/battle/guild.conf
@@ -36,3 +36,9 @@ require_glory_guild: no
// If you want to change this value, clear the guild alliance table.
// 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
diff --git a/src/map/battle.c b/src/map/battle.c
index 2a5e82e30..f64700f0c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6501,6 +6501,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, },
};
#ifndef STATS_OPT_OUT
/**
diff --git a/src/map/battle.h b/src/map/battle.h
index 99856de94..bbba415f5 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -458,6 +458,7 @@ struct Battle_Config {
int client_accept_chatdori; // [Ai4rei/Mirei]
int snovice_call_type;
+ int guild_notice_changemap;
} battle_config;
diff --git a/src/map/clif.c b/src/map/clif.c
index 4ad4f266b..32291e68f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9336,8 +9336,7 @@ void clif_hercules_chsys_mjoin(struct map_session_data *sd) {
/// Notification from the client, that it has finished map loading and is about to display player's character (CZ_NOTIFY_ACTORINIT).
/// 007d
-void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
-{
+void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if(sd->bl.prev != NULL)
return;
@@ -9549,6 +9548,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if(sd->npc_id)
npc_event_dequeue(sd);
+
+ if( sd->guild && ( battle_config.guild_notice_changemap == 2 || ( battle_config.guild_notice_changemap == 1 && sd->state.changemap ) ) )
+ clif->guild_notice(sd,sd->guild);
}
if( sd->state.changemap ) {// restore information that gets lost on map-change