summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-18 22:29:04 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-18 22:29:04 +0000
commit8188efbcea52913a95e7e5c081a42a6eea07d479 (patch)
tree1e9233f913796414aaf85b0350213b19ab7fc5af /src/map/clif.c
parent460ee2693ff9c955cf8d9cb6aa748d5d541297d1 (diff)
downloadhercules-8188efbcea52913a95e7e5c081a42a6eea07d479.tar.gz
hercules-8188efbcea52913a95e7e5c081a42a6eea07d479.tar.bz2
hercules-8188efbcea52913a95e7e5c081a42a6eea07d479.tar.xz
hercules-8188efbcea52913a95e7e5c081a42a6eea07d479.zip
Fixed invited party members not displaying correctly (bugreport:1199)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12394 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 678581d03..ce37e3816 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5301,20 +5301,22 @@ int clif_party_created(struct map_session_data *sd,int result)
int clif_party_member_info(struct party_data *p, struct map_session_data *sd)
{
unsigned char buf[96];
+ int i;
if (!sd) { //Pick any party member (this call is used when changing item share rules)
- int i;
- for (i=0; i<MAX_PARTY && !p->data[i].sd; i++);
- if (i >= MAX_PARTY) return 0; //Should never happen...
- sd = p->data[i].sd;
+ ARR_FIND( 0, MAX_PARTY, i, p->data[i].sd != 0 );
+ } else {
+ ARR_FIND( 0, MAX_PARTY, i, p->data[i].sd == sd );
}
+ if (i >= MAX_PARTY) return 0; //Should never happen...
+ sd = p->data[i].sd;
WBUFW(buf, 0) = 0x1e9;
WBUFL(buf, 2) = sd->status.account_id;
- WBUFL(buf, 6) = 0;
+ WBUFL(buf, 6) = (p->party.member[i].leader)?1:0;
WBUFW(buf,10) = sd->bl.x;
WBUFW(buf,12) = sd->bl.y;
- WBUFB(buf,14) = 0; //Unconfirmed byte, could be online/offline.
+ WBUFB(buf,14) = (p->party.member[i].online)?1:0;
memcpy(WBUFP(buf,15), p->party.name, NAME_LENGTH);
memcpy(WBUFP(buf,39), sd->status.name, NAME_LENGTH);
mapindex_getmapname_ext(mapindex_id2name(sd->mapindex), (char*)WBUFP(buf,63));