diff options
author | KirieZ <guilherme.menaldo@outlook.com> | 2016-12-23 10:31:27 -0200 |
---|---|---|
committer | KirieZ <guilherme.menaldo@outlook.com> | 2016-12-23 10:33:39 -0200 |
commit | 946b7f8490e952fbd90c6760f256ddfdd1e98137 (patch) | |
tree | 56003c94632198237367d1ba452a7d9f238b891f /src/char/int_party.c | |
parent | 19c07f43a7d58462a6437ab92d5690302304c592 (diff) | |
download | hercules-946b7f8490e952fbd90c6760f256ddfdd1e98137.tar.gz hercules-946b7f8490e952fbd90c6760f256ddfdd1e98137.tar.bz2 hercules-946b7f8490e952fbd90c6760f256ddfdd1e98137.tar.xz hercules-946b7f8490e952fbd90c6760f256ddfdd1e98137.zip |
Follow-up 19c07f4
Diffstat (limited to 'src/char/int_party.c')
-rw-r--r-- | src/char/int_party.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char/int_party.c b/src/char/int_party.c index df1d339cf..43583828d 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -639,7 +639,8 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) inter_party->tosql(&p->party,PS_DELMEMBER,i); j = p->party.member[i].lv; - if (p->party.member[i].online > 0) p->party.count--; + if (p->party.member[i].online > 0) + p->party.count--; memset(&p->party.member[i], 0, sizeof(struct party_member)); p->size--; if (j == p->min_lv || j == p->max_lv || p->family) { @@ -649,8 +650,7 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) if (leader) { // Member was party leader, pick a new leader - i = 0; - while (i < MAX_PARTY && p->party.member[i].account_id == 0) i++; + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].account_id != 0); if (i < MAX_PARTY) { // Update party's leader |