diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-21 18:43:50 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-21 18:43:50 +0000 |
commit | 8ef45ce58519b6e9eaad12b49110346c0a371242 (patch) | |
tree | f247ab1b5a2e309a7da18914848d2537e0d1242b /src/map/guild.c | |
parent | 0988a4623402706dced4808b565702135d7e963f (diff) | |
download | hercules-8ef45ce58519b6e9eaad12b49110346c0a371242.tar.gz hercules-8ef45ce58519b6e9eaad12b49110346c0a371242.tar.bz2 hercules-8ef45ce58519b6e9eaad12b49110346c0a371242.tar.xz hercules-8ef45ce58519b6e9eaad12b49110346c0a371242.zip |
- Modified party_send_movemap and guild_send_info_short to send the mini-dots to the player logging on.
- Added functions clif_party/guild_xy_single to send the xy dots to a single fd.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5359 54d463be-8e91-2dee-dedb-b68131a5f0ec
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;
}
|