From a3c05905081e784727d9a8f756891b459912b652 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Sun, 2 Jul 2017 23:40:30 +0200 Subject: [PATCH] Added some checks to guild leader change Introduces two new configurations: 1) Allow guild leader changes in WoE (yes/no) Default: no 2) Delay between the changes (in minutes) Default: 1440 minutes = 1 day Follow up to b51617c --- conf/battle/guild.conf | 10 ++++++++++ doc/packet_interserv.txt | 7 ++++--- sql-files/main.sql | 1 + sql-files/upgrades/upgrade_20170702.sql | 2 ++ src/char/int_guild.c | 20 ++++++++++++++------ src/common/mmo.h | 1 + src/map/battle.c | 2 ++ src/map/battle.h | 2 ++ src/map/clif.c | 10 ++++++++++ src/map/clif.h | 4 +++- src/map/guild.c | 5 ++++- src/map/guild.h | 2 +- src/map/intif.c | 4 ++-- 13 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 sql-files/upgrades/upgrade_20170702.sql diff --git a/conf/battle/guild.conf b/conf/battle/guild.conf index 8bbd87bf04..3eed5f8361 100644 --- a/conf/battle/guild.conf +++ b/conf/battle/guild.conf @@ -61,3 +61,13 @@ guild_notice_changemap: 2 // Should maprespawnguildid kill clones too? // Default: no guild_maprespawn_clones: no + +// How long (in minutes) should a guild have to wait between guild master changes? +// Default: 1440 (1 day) +// Use 0 minutes to disable the delay. +//guild_leaderchange_delay: 1440 +guild_leaderchange_delay: 0 + +// Is changing the guild leader allowed during WoE? +// Default: no +guild_leaderchange_woe: no diff --git a/doc/packet_interserv.txt b/doc/packet_interserv.txt index 78b7595c93..28afd7ad6e 100644 --- a/doc/packet_interserv.txt +++ b/doc/packet_interserv.txt @@ -1967,14 +1967,15 @@ Currently the max packet size is 0xFFFF (see 'WFIFOSET()' in 'src/common/socket. 0x3843 Type: IZ - Structure: .W .L .L .L - index: 0,2,6,10 - len: 14 + Structure: .W .L .L .L