summaryrefslogtreecommitdiff
path: root/src/char/int_party.c
diff options
context:
space:
mode:
authorKirieZ <guilherme.menaldo@outlook.com>2017-02-12 12:08:49 -0200
committerKirieZ <guilherme.menaldo@outlook.com>2017-02-12 12:08:49 -0200
commit2ce4c3e261f59df22ff23259574b6bfccc11bf3b (patch)
treef8e849d766786cc5ac3a3796cc7af397bfdeefda /src/char/int_party.c
parent946b7f8490e952fbd90c6760f256ddfdd1e98137 (diff)
downloadhercules-2ce4c3e261f59df22ff23259574b6bfccc11bf3b.tar.gz
hercules-2ce4c3e261f59df22ff23259574b6bfccc11bf3b.tar.bz2
hercules-2ce4c3e261f59df22ff23259574b6bfccc11bf3b.tar.xz
hercules-2ce4c3e261f59df22ff23259574b6bfccc11bf3b.zip
Follow-up 946b7f8490e952fbd90c6760f256ddfdd1e98137
Diffstat (limited to 'src/char/int_party.c')
-rw-r--r--src/char/int_party.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 43583828d..921bf6d9d 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -614,7 +614,6 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id)
{
struct party_data *p;
int i,j;
- unsigned int leader;
p = inter_party->fromsql(party_id);
if( p == NULL )
@@ -634,10 +633,7 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id)
return 0; //Member not found?
mapif->party_withdraw(party_id, account_id, char_id);
-
- leader = p->party.member[i].leader; // member's leader state
- inter_party->tosql(&p->party,PS_DELMEMBER,i);
j = p->party.member[i].lv;
if (p->party.member[i].online > 0)
p->party.count--;
@@ -648,19 +644,10 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id)
inter_party->check_lv(p);
}
- if (leader) {
- // Member was party leader, pick a new leader
- ARR_FIND(0, MAX_PARTY, i, p->party.member[i].account_id != 0);
-
- if (i < MAX_PARTY) {
- // Update party's leader
- p->party.member[i].leader = 1;
- inter_party->tosql(&p->party, PS_LEADER, i);
- }
- }
-
- if (inter_party->check_empty(p) == 0)
+ if (inter_party->check_empty(p) == 0) {
+ inter_party->tosql(&p->party, PS_DELMEMBER, i);
mapif->party_info(-1, &p->party, 0);
+ }
return 0;
}
// When member goes to other map or levels up.