summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorLuzZza <LuzZza@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-21 17:46:27 +0000
committerLuzZza <LuzZza@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-21 17:46:27 +0000
commit8334acc1e4991b02a5f963a546aed211659522b1 (patch)
treedd551a5fb238d423c68d6e457e1c25b8cfffc180 /src/map/clif.c
parent6460ab9b943f664e4353b375174a14e682e2d2fd (diff)
downloadhercules-8334acc1e4991b02a5f963a546aed211659522b1.tar.gz
hercules-8334acc1e4991b02a5f963a546aed211659522b1.tar.bz2
hercules-8334acc1e4991b02a5f963a546aed211659522b1.tar.xz
hercules-8334acc1e4991b02a5f963a546aed211659522b1.zip
Fix on not showing guildmembers logins/logouts messages.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5695 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 07ea1598d..17d6c454c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7337,6 +7337,47 @@ int clif_guild_memberlogin_notice(struct guild *g,int idx,int flag)
clif_send(buf,packet_len_table[0x16d],&g->member[idx].sd->bl,GUILD_WOS);
return 0;
}
+
+// Function `clif_guild_memberlogin_notice` sends info about
+// logins and logouts of a guild member to the rest members.
+// But at the 1st time (after a player login or map changing)
+// the client won't show the message.
+// So I suggest use this function for sending "first-time-info"
+// to some player on entering the game or changing location.
+// At next time the client would always show the message.
+// The function sends all the statuses in the single packet
+// to economize traffic. [LuzZza]
+int clif_guild_send_onlineinfo(struct map_session_data *sd) {
+
+ struct guild *g;
+ char buf[14*128];
+ int i, count=0, p_len;
+
+ nullpo_retr(0, sd);
+
+ p_len = packet_len_table[0x16d];
+
+ if(!(g = guild_search(sd->status.guild_id)))
+ return 0;
+
+ for(i=0; i<g->max_member; i++) {
+
+ if(g->member[i].account_id > 0 &&
+ g->member[i].account_id != sd->status.account_id) {
+
+ WBUFW(buf,count*p_len) = 0x16d;
+ WBUFL(buf,count*p_len+2) = g->member[i].account_id;
+ WBUFL(buf,count*p_len+6) = g->member[i].char_id;
+ WBUFL(buf,count*p_len+10) = g->member[i].online;
+ count++;
+ }
+ }
+
+ clif_send(buf,p_len*count,&sd->bl,SELF);
+
+ return 0;
+}
+
/*==========================================
* ギルドマスター通知(14dへの応答)
*------------------------------------------
@@ -8766,6 +8807,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
//clif_misceffect2(&sd->bl, 159);
}
+ //[LuzZza]
+ clif_guild_send_onlineinfo(sd);
+
// pvp
//if(sd->pvp_timer!=-1 && !battle_config.pk_mode) /PVP Client crash fix* Removed timer deletion
// delete_timer(sd->pvp_timer,pc_calc_pvprank_timer);