summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-08 13:34:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-08 13:34:38 +0000
commit9f4ef6d974826a6fff8e12ebf1e73bedd103f958 (patch)
treed3c095190a56b3f09df9641af2f7e7cf3ca2641f /src/map/guild.c
parente392d2608cf3ff2ca7a56a0e5d5b776418513313 (diff)
downloadhercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.tar.gz
hercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.tar.bz2
hercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.tar.xz
hercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.zip
- Fixed alliance/opposition making not cancelling out map-server-side when the guild already had max number of alliances/oppositions (thanks to k3dt)
- Cleaned a bit the code for SG_*_ANGER - Fixed a warning in clif.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8673 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index de23c4254..21d88f67b 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1285,12 +1285,16 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
if(sd->status.guild_id == tsd->status.guild_id)
return 0;
- if( guild_get_alliance_count(g[0],0)>=3 ) // 同盟数確認
+ if( guild_get_alliance_count(g[0],0)>=3 ) {
clif_guild_allianceack(sd,4);
- if( guild_get_alliance_count(g[1],0)>=3 )
+ return 0;
+ }
+ if( guild_get_alliance_count(g[1],0)>=3 ) {
clif_guild_allianceack(sd,3);
+ return 0;
+ }
- if( tsd->guild_alliance>0 ){ // 相手が同盟要請状態かどうか確認
+ if( tsd->guild_alliance>0 ){
clif_guild_allianceack(sd,1);
return 0;
}
@@ -1393,8 +1397,10 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
if(sd->status.guild_id == tsd->status.guild_id)
return 0;
- if( guild_get_alliance_count(g,1)>=3 ) // 敵対数確認
+ if( guild_get_alliance_count(g,1)>=3 ) {
clif_guild_oppositionack(sd,1);
+ return 0;
+ }
if(agit_flag) {
clif_displaymessage(sd->fd,"You cannot make oppositions during Guild Wars!");