diff options
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 30 |
1 files changed, 19 insertions, 11 deletions
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 |