diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-15 05:30:25 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-15 05:30:25 +0000 |
commit | a7c1a55bb6f3c3236ba02722e948a52c645a4918 (patch) | |
tree | 15c41cc68bb37051f7fb94bac03055875e25fe5d /src/map/guild.c | |
parent | ec4acd7b1d7f180af5929239ef0706d98d4b6bfc (diff) | |
download | hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.tar.gz hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.tar.bz2 hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.tar.xz hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.zip |
* Merged changes from trunk [14784:14819/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14821 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index e56b346ec..c80b124ef 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -36,7 +36,7 @@ static DBMap* guild_infoevent_db; // int guild_id -> struct eventlist* static DBMap* guild_castleinfoevent_db; // int castle_id_index -> struct eventlist* struct eventlist { - char name[50]; + char name[EVENT_NAME_LENGTH]; struct eventlist *next; }; @@ -325,7 +325,7 @@ int guild_send_xy_timer_sub(DBKey key,void *data,va_list ap) for(i=0;i<g->max_member;i++){ //struct map_session_data* sd = g->member[i].sd; struct map_session_data* sd = map_charid2sd(g->member[i].char_id); // temporary crashfix - if( sd != NULL && (sd->guild_x != sd->bl.x || sd->guild_y != sd->bl.y) && !sd->state.bg_id ) + if( sd != NULL && (sd->guild_x != sd->bl.x || sd->guild_y != sd->bl.y) && !sd->bg_id ) { clif_guild_xy(sd); sd->guild_x = sd->bl.x; @@ -1545,7 +1545,7 @@ int guild_broken(int guild_id,int flag) struct guild_castle *gc=NULL; struct map_session_data *sd; int i; - char name[50]; + char name[EVENT_NAME_LENGTH]; if(flag!=0 || g==NULL) return 0; @@ -1604,7 +1604,7 @@ int guild_gm_changed(int guild_id, int account_id, int char_id) { struct guild *g; struct guild_member gm; - int pos; + int pos, i; g=guild_search(guild_id); @@ -1638,7 +1638,18 @@ int guild_gm_changed(int guild_id, int account_id, int char_id) g->member[0].sd->state.gmaster_flag = g; //Block his skills for 5 minutes to prevent abuse. guild_block_skill(g->member[0].sd, 300000); - } + } + + // announce the change to all guild members + for( i = 0; i < g->max_member; i++ ) + { + if( g->member[i].sd && g->member[i].sd->fd ) + { + clif_guild_basicinfo(g->member[i].sd); + clif_guild_memberlist(g->member[i].sd); + } + } + return 1; } |