Config for guild alliance only by master (#2291)
Added a new configuration to allow to restrict alliance requests to the guild master. Thanks to @f0und3r
This commit is contained in:
parent
02135c4e2e
commit
b21f7c0a1f
@ -70,3 +70,7 @@ guild_leaderchange_delay: 1440
|
||||
// Is changing the guild leader allowed during WoE?
|
||||
// Default: no
|
||||
guild_leaderchange_woe: no
|
||||
|
||||
// Only guild master can accept alliance?
|
||||
// Default: no
|
||||
guild_alliance_onlygm: no
|
||||
|
@ -8427,6 +8427,7 @@ static const struct _battle_data {
|
||||
{ "banana_bomb_duration", &battle_config.banana_bomb_duration, 0, 0, UINT16_MAX, },
|
||||
{ "guild_leaderchange_delay", &battle_config.guild_leaderchange_delay, 1440, 0, INT32_MAX, },
|
||||
{ "guild_leaderchange_woe", &battle_config.guild_leaderchange_woe, 0, 0, 1, },
|
||||
{ "guild_alliance_onlygm", &battle_config.guild_alliance_onlygm, 0, 0, 1, },
|
||||
{ "feature.achievement", &battle_config.feature_achievement, 1, 0, 1, },
|
||||
|
||||
#include "../custom/battle_config_init.inc"
|
||||
|
@ -627,6 +627,7 @@ extern struct Battle_Config
|
||||
int banana_bomb_duration;
|
||||
int guild_leaderchange_delay;
|
||||
int guild_leaderchange_woe;
|
||||
int guild_alliance_onlygm;
|
||||
int feature_achievement;
|
||||
|
||||
#include "../custom/battle_config_struct.inc"
|
||||
|
@ -1434,6 +1434,12 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
|
||||
if(tsd==NULL || tsd->status.guild_id<=0)
|
||||
return 0;
|
||||
|
||||
// Check, is tsd guild master, if not - cancel alliance. [f0und3r]
|
||||
if (battle_config.guild_alliance_onlygm && !tsd->state.gmaster_flag) {
|
||||
clif_guild_allianceack(sd, 5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
g[0]=sd->guild;
|
||||
g[1]=tsd->guild;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user