From df1952d3ecaa5708dbe12e6f32137243c6bfdacb Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 9 Sep 2013 19:00:01 -0300 Subject: 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 --- src/map/battle.c | 1 + src/map/battle.h | 1 + src/map/clif.c | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-60-g2f50