Additional settings in guild.conf

kyeme

High Council
Messages
500
Points
0
Github
kyeme
Emulator
I suggest that we should have a config. in WOE that we can Invite/Expel players while inside the Guild Castle (because in the official server this is the Old settings - I'm not sure if it is the actual settings now.) But if it is the official behavior, I suggest we should have a config just like the Old one.
 
e.g
Code:
// <msg>// <msg>castle_member_invite: yescastle_member_expel: yes
 
Up~
default_smile.png


 
That's a good idea, and it wouldn't be difficult to implement either. I've changed the names of those config options.

Open src/map/battle.c and find:

Code:
{ "case_sensitive_aegisnames",          &battle_config.case_sensitive_aegisnames,       1,      0,      1,              },
Add below:
Code:
{ "guild_castle_invite",				&battle_config.guild_castle_invite,				0,		0,		1,				},{ "guild_castle_expulsion",				&battle_config.guild_castle_expulsion,			0,		0,		1,				},
Open src/map/battle.h and find:
Code:
int case_sensitive_aegisnames;
Add below:
Code:
	int guild_castle_invite;	int guild_castle_expulsion;
Finally open src/map/guild.c and find (@guild_invite):
Code:
 	if( tsd->status.guild_id > 0 	 || tsd->guild_invite > 0	 || ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
Replace it with:
Code:
 	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)
Find (@guild_leave):
Code:
 	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)
Replace it with:
Code:
 	if( sd->status.account_id != account_id 	 || 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)
Find (@guild_expulsion):
Code:
 	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)
Replace it with:
Code:
 	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)
In your conf/battle/guild.conf add:
Code:
// Can guild members invite/expel members inside guild castles in WoE/GvG? (Note 1)// default noguild_castle_invite: noguild_castle_expulsion: no
 
I personally like it but the lack of support makes me wonder whether its worth to put it in the core, perhaps a plugin would do best? (I wouldn't mind coding the plugin myself)

 
invite/expel a guild member is part of the behavior of guildlock mapflag

http://rathena.org/wiki/Mapflag#guildlock

why not just add guildlock mapflag on these castle maps ?

EDIT:

ok I was wrong ... again

the original behavior was already disallow to invite/expel

now he wants a configuration that allows to invite/expel

 
Last edited by a moderator:
ohoho as i understand that kills the proposal, indeed

 
That's a good idea, and it wouldn't be difficult to implement either. I've changed the names of those config options.
Open src/map/battle.c and find:

{ "case_sensitive_aegisnames", &battle_config.case_sensitive_aegisnames, 1, 0, 1, },Add below:
Code:
{ "guild_castle_invite",				&battle_config.guild_castle_invite,				0,		0,		1,				},{ "guild_castle_expulsion",				&battle_config.guild_castle_expulsion,			0,		0,		1,				},
Open src/map/battle.h and find:
Code:
int case_sensitive_aegisnames;
Add below:
Code:
	int guild_castle_invite;	int guild_castle_expulsion;
Finally open src/map/guild.c and find (@guild_invite):
Code:
 	if( tsd->status.guild_id > 0 	 || tsd->guild_invite > 0	 || ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
Replace it with:
Code:
 	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)
Find (@guild_leave):
Code:
 	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)
Replace it with:
Code:
 	if( sd->status.account_id != account_id 	 || 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)
Find (@guild_expulsion):
Code:
 	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)
Replace it with:
Code:
 	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)
In your conf/battle/guild.conf add:
Code:
// Can guild members invite/expel members inside guild castles in WoE/GvG? (Note 1)// default noguild_castle_invite: noguild_castle_expulsion: no

Please add to the main repo. Thanks <3

 
Last edited by a moderator:
That's a good idea, and it wouldn't be difficult to implement either. I've changed the names of those config options.
Open src/map/battle.c and find:

{ "case_sensitive_aegisnames", &battle_config.case_sensitive_aegisnames, 1, 0, 1, },Add below:
Code:
{ "guild_castle_invite",				&battle_config.guild_castle_invite,				0,		0,		1,				},{ "guild_castle_expulsion",				&battle_config.guild_castle_expulsion,			0,		0,		1,				},
Open src/map/battle.h and find:
Code:
int case_sensitive_aegisnames;
Add below:
Code:
	int guild_castle_invite;	int guild_castle_expulsion;
Finally open src/map/guild.c and find (@guild_invite):
Code:
 	if( tsd->status.guild_id > 0 	 || tsd->guild_invite > 0	 || ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
Replace it with:
Code:
 	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)
Find (@guild_leave):
Code:
 	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)
Replace it with:
Code:
 	if( sd->status.account_id != account_id 	 || 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)
Find (@guild_expulsion):
Code:
 	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)
Replace it with:
Code:
 	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)
In your conf/battle/guild.conf add:
Code:
// Can guild members invite/expel members inside guild castles in WoE/GvG? (Note 1)// default noguild_castle_invite: noguild_castle_expulsion: no

Up~ 
default_tongue.png


 
Should no objections or other points come forward within the next week I'll commit this change to our main repository.

 
Back
Top