diff options
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 47970e147..5d38b5f98 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -880,7 +880,8 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag, int guild_send_memberinfoshort(struct map_session_data *sd,int online)
{
struct guild *g;
-
+ int i;
+
nullpo_retr(0, sd);
if(sd->status.guild_id<=0)
@@ -893,10 +894,18 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class_);
if( !online ){ // ログアウトするならsdをクリアして終了
- int i=guild_getindex(g,sd->status.account_id,sd->status.char_id);
+ i=guild_getindex(g,sd->status.account_id,sd->status.char_id);
if(i>=0)
g->member[i].sd=NULL;
return 0;
+ } else if (sd->fd) {
+ //Send XY dot updates. [Skotlex]
+ for(i=0; i < MAX_GUILD; i++) {
+ if (!g->member[i].sd || g->member[i].sd == sd ||
+ g->member[i].sd->bl.m != sd->bl.m)
+ continue;
+ clif_guild_xy_single(sd->fd, g->member[i].sd);
+ }
}
if( sd->state.guild_sent!=0 ) // ギルド初期送信データは送信済み
@@ -906,14 +915,12 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) guild_check_conflict(sd);
// あるならギルド初期送信データ送信
- if( (g=guild_search(sd->status.guild_id))!=NULL ){
- guild_check_member(g); // 所属を確認する
- if(sd->status.guild_id==g->guild_id){
- clif_guild_belonginfo(sd,g);
- clif_guild_notice(sd,g);
- sd->state.guild_sent=1;
- sd->guild_emblem_id=g->emblem_id;
- }
+ guild_check_member(g); // 所属を確認する
+ if(sd->status.guild_id==g->guild_id){
+ clif_guild_belonginfo(sd,g);
+ clif_guild_notice(sd,g);
+ sd->state.guild_sent=1;
+ sd->guild_emblem_id=g->emblem_id;
}
return 0;
}
|