summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/guild.conf5
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/guild.c30
4 files changed, 28 insertions, 11 deletions
diff --git a/conf/battle/guild.conf b/conf/battle/guild.conf
index a40cbbe3a..91c39fe71 100644
--- a/conf/battle/guild.conf
+++ b/conf/battle/guild.conf
@@ -42,3 +42,8 @@ max_guild_alliance: 3
// Upon changing maps: 1
// Do not re-display: 0 (disabled)
guild_notice_changemap: 2
+
+// Can guild members invite/expel members inside guild castles in WoE/GvG? (Note 1)
+// default: no
+guild_castle_invite: no
+guild_castle_expulsion: no \ No newline at end of file
diff --git a/src/map/battle.c b/src/map/battle.c
index 92f68d433..57302166e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6745,6 +6745,8 @@ static const struct _battle_data {
{ "mon_trans_disable_in_gvg", &battle_config.mon_trans_disable_in_gvg, 0, 0, 1, },
{ "case_sensitive_aegisnames", &battle_config.case_sensitive_aegisnames, 1, 0, 1, },
+ { "guild_castle_invite", &battle_config.guild_castle_invite, 0, 0, 1, },
+ { "guild_castle_expulsion", &battle_config.guild_castle_expulsion, 0, 0, 1, },
};
#ifndef STATS_OPT_OUT
/**
diff --git a/src/map/battle.h b/src/map/battle.h
index 0ae18ec30..433dca95f 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -469,6 +469,8 @@ struct Battle_Config {
int mon_trans_disable_in_gvg;
int case_sensitive_aegisnames;
+ int guild_castle_invite;
+ int guild_castle_expulsion;
};
extern struct Battle_Config battle_config;
diff --git a/src/map/guild.c b/src/map/guild.c
index 935cac8c0..042a6e801 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -621,9 +621,12 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
return 0;
}
- if( tsd->status.guild_id > 0
- || tsd->guild_invite > 0
- || ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
+ if( tsd->status.guild_id > 0
+ || tsd->guild_invite > 0
+ || ( (map->agit_flag || map->agit2_flag)
+ && map->list[tsd->bl.m].flag.gvg_castle
+ && !battle_config.guild_castle_invite
+ )
) {
//Can't invite people inside castles. [Skotlex]
clif->guild_inviteack(sd,0);
@@ -806,10 +809,13 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c
return 0;
if( sd->status.account_id != account_id
- || sd->status.char_id != char_id
- || sd->status.guild_id != guild_id
- || ((map->agit_flag || map->agit2_flag) && map->list[sd->bl.m].flag.gvg_castle)
- )
+ || sd->status.char_id != char_id
+ || sd->status.guild_id != guild_id
+ // Can't leave inside castles
+ || ((map->agit_flag || map->agit2_flag)
+ && map->list[sd->bl.m].flag.gvg_castle
+ && !battle_config.guild_castle_expulsion)
+ )
return 0;
intif->guild_leave(sd->status.guild_id, sd->status.account_id, sd->status.char_id,0,mes);
@@ -838,10 +844,12 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, i
return 0; //Expulsion permission
//Can't leave inside guild castles.
- if ((tsd = map->id2sd(account_id))
- && tsd->status.char_id == char_id
- && ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
- )
+ if ((tsd = map->id2sd(account_id))
+ && tsd->status.char_id == char_id
+ && ((map->agit_flag || map->agit2_flag)
+ && map->list[sd->bl.m].flag.gvg_castle
+ && !battle_config.guild_castle_expulsion)
+ )
return 0;
// find the member and perform expulsion