summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-08 17:39:40 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-08 17:39:40 +0000
commitf77cbff9305f4d3c6dc49d870369bf0897864049 (patch)
tree43772fe62e422943239cc901f2168689b8b18d01
parentb5be01c5baca2d51da4ec9a138e3bb57eea7cbb4 (diff)
downloadhercules-f77cbff9305f4d3c6dc49d870369bf0897864049.tar.gz
hercules-f77cbff9305f4d3c6dc49d870369bf0897864049.tar.bz2
hercules-f77cbff9305f4d3c6dc49d870369bf0897864049.tar.xz
hercules-f77cbff9305f4d3c6dc49d870369bf0897864049.zip
- Added a new setting 'guild_skill_relog_delay' to activate the guild skills delay on Guild Master relog.
- The official setting is 'No', but this is an option for game masters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11699 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--conf/battle/guild.conf4
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/guild.c6
-rw-r--r--src/map/pc.c4
6 files changed, 12 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index c4794189f..370a7e456 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -22,6 +22,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
- small correction to the help text of --with-mysql and --with-pcre
- added the -Wno-switch compiler option to suppress the
"enumeration value '%s' not handled in switch" warnings
+ * Added a new setting 'guild_skill_relog_delay' to activate the guild skills delay
+ on Guild Master relog. [Zephyrus]
2007/11/07
* Some updates on the mail system packets [Zephyrus]
- Corrected the mail database structure on main.sql
diff --git a/conf/battle/guild.conf b/conf/battle/guild.conf
index 2c474552e..9fa3fb424 100644
--- a/conf/battle/guild.conf
+++ b/conf/battle/guild.conf
@@ -28,6 +28,10 @@ guild_exp_limit: 50
// Maximum castles one guild can own (0 = unlimited)
guild_max_castles: 0
+// Activate guild skills delay by relog? (Note 1)
+// Oficial setting is "no" but this prevent the abuse of skiping the 5 minutes delay on guild master relog.
+guild_skill_relog_delay: no
+
// Damage adjustments for WOE battles against defending Guild monsters (Note 2)
castle_defense_rate: 100
diff --git a/src/map/battle.c b/src/map/battle.c
index 1d283e6a1..f8fbd5a68 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3370,6 +3370,7 @@ static const struct _battle_data {
{ "chase_range_rate", &battle_config.chase_range_rate, 100, 0, INT_MAX, },
{ "gtb_sc_immunity", &battle_config.gtb_sc_immunity, 50, 0, INT_MAX, },
{ "guild_max_castles", &battle_config.guild_max_castles, 0, 0, INT_MAX, },
+ { "guild_skill_relog_delay", &battle_config.guild_skill_relog_delay 0, 0, 1, },
{ "emergency_call", &battle_config.emergency_call, 11, 0, 31, },
{ "atcommand_gm_only", &battle_config.atc_gmonly, 0, 0, 1, },
{ "atcommand_spawn_quantity_limit", &battle_config.atc_spawn_quantity_limit, 100, 0, INT_MAX, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 3ee7d24e5..c2e4af72c 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -173,6 +173,7 @@ extern struct Battle_Config
int guild_emperium_check;
int guild_exp_limit;
int guild_max_castles;
+ int guild_skill_relog_delay;
int emergency_call;
int guild_aura;
int pc_invincible_time;
diff --git a/src/map/guild.c b/src/map/guild.c
index 40449baf0..e111a91c3 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -553,10 +553,8 @@ int guild_recv_info(struct guild *sg)
guild_check_member(sg);
if ((sd = map_nick2sd(sg->master)) != NULL)
{
- //If the guild master is online the first time the guild_info is received, that means he was the first to join,
- //and as such, his guild skills should be blocked to avoid login/logout abuse [Skotlex]
- //(optionally)
- //guild_block_skill(sd, 300000);
+ if( battle_config.guild_skill_relog_delay )
+ guild_block_skill(sd, 300000);
//Also set the guild master flag.
sd->state.gmaster_flag = g;
diff --git a/src/map/pc.c b/src/map/pc.c
index 448a82a4e..0163c21e7 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -885,8 +885,8 @@ int pc_reg_received(struct map_session_data *sd)
{
// set the Guild Master flag
sd->state.gmaster_flag = g;
- // (optionally) block Guild Skills to prevent logout/login reuse
- //guild_block_skill(sd, 300000);
+ if( battle_config.guild_skill_relog_delay )
+ guild_block_skill(sd, 300000);
}
status_calc_pc(sd,1);