summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-07 11:35:13 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-07 11:35:13 +0000
commit24ec5cc01a034fe378bc0e8dfb7426a2dbbf8563 (patch)
treeb5c5bcfdd52bea7f5b223653e24e757d1369551a /src/map/guild.c
parent4bd24425858e186737a3dd60bbe1ee2f3a4a4e67 (diff)
downloadhercules-24ec5cc01a034fe378bc0e8dfb7426a2dbbf8563.tar.gz
hercules-24ec5cc01a034fe378bc0e8dfb7426a2dbbf8563.tar.bz2
hercules-24ec5cc01a034fe378bc0e8dfb7426a2dbbf8563.tar.xz
hercules-24ec5cc01a034fe378bc0e8dfb7426a2dbbf8563.zip
* Updated core and map-server to jA 1115~1137
* Fixed a typo in Volcano git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1206 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index ea9c3795f..06838c4b8 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -678,11 +678,10 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
{
struct map_session_data *sd=map_id2sd(account_id);
struct guild *g=guild_search(guild_id);
- int i;
if(g!=NULL){
int i;
- for(i=0;i<g->max_member;i++)
+ for(i=0;i<g->max_member;i++) {
if( g->member[i].account_id==account_id &&
g->member[i].char_id==char_id ){
struct map_session_data *sd2=sd;
@@ -698,6 +697,12 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
g->member[i].account_id=0;
g->member[i].sd=NULL;
}
+ // メンバーリストを全員に再通知
+ for(i=0;i<g->max_member;i++){
+ if( g->member[i].sd!=NULL )
+ clif_guild_memberlist(g->member[i].sd);
+ }
+ }
}
if(sd!=NULL) {
if (sd->status.guild_id==guild_id){
@@ -706,13 +711,7 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag,
sd->guild_sended=0;
}
}
-
- // メンバーリストを全員に再通知
- for(i=0;i<g->max_member;i++){
- if( g->member[i].sd!=NULL )
- clif_guild_memberlist(g->member[i].sd);
- }
-
+
return 0;
}
// ギルドメンバのオンライン状態/Lv更新送信
@@ -1037,6 +1036,23 @@ int guild_get_alliance_count(struct guild *g,int flag)
}
return c;
}
+// 同盟関係かどうかチェック
+// 同盟なら1、それ以外は0
+int guild_check_alliance(int guild_id1, int guild_id2, int flag)
+{
+ struct guild *g;
+ int i;
+
+ g = guild_search(guild_id1);
+ if (g == NULL)
+ return 0;
+
+ for (i=0; i<MAX_GUILDALLIANCE; i++)
+ if ((g->alliance[i].guild_id == guild_id2) && (g->alliance[i].opposition == flag))
+ return 1;
+
+ return 0;
+}
// ギルド同盟要求
int guild_reqalliance(struct map_session_data *sd,int account_id)
{