summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-05-29 12:06:46 -0300
committerpanikon <panikon@zoho.com>2014-05-29 12:06:46 -0300
commit407502abc921bb4cf06ff462ab6e2f23a327e950 (patch)
treeeecc5001577d844849330ea6ced79b60d91b961b /src/map/guild.c
parentb7373b6de5b41a4b420741da9ebf0570e36c11c7 (diff)
downloadhercules-407502abc921bb4cf06ff462ab6e2f23a327e950.tar.gz
hercules-407502abc921bb4cf06ff462ab6e2f23a327e950.tar.bz2
hercules-407502abc921bb4cf06ff462ab6e2f23a327e950.tar.xz
hercules-407502abc921bb4cf06ff462ab6e2f23a327e950.zip
Added guild_castle_invite and guild_castle_expulsion to guild.conf, they determine how invite/expel work inside castles during WoE/GvG
See: http://hercules.ws/board/topic/1623-additional-settings-in-guildconf/
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c30
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