From c6e5d51e40a8e8e36af20abd39dc1bd44c863f64 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 8 Dec 2011 18:06:20 +0000 Subject: Babies can now share exp with either of their parents (or even both) ignoring level limitation (default) bugreport:4086 thanks to RoM git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15029 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char_sql/int_party.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c index 88c352b44..d62e9f6a7 100644 --- a/src/char_sql/int_party.c +++ b/src/char_sql/int_party.c @@ -42,7 +42,10 @@ static int int_party_check_lv(struct party_data *p) { p->min_lv = UINT_MAX; p->max_lv = 0; for(i=0;iparty.member[i].online) + /** + * - If not online OR if it's a family party and this is the child (doesn't affect exp range) + **/ + if(!p->party.member[i].online || p->party.member[i].char_id == p->family ) continue; lv=p->party.member[i].lv; @@ -75,7 +78,13 @@ static void int_party_calc_state(struct party_data *p) if(p->party.member[i].online) p->party.count++; } - if(p->size == 3) { + if( p->size == 2 && ( char_child(p->party.member[0].char_id,p->party.member[1].char_id) || char_child(p->party.member[1].char_id,p->party.member[2].char_id) ) ) { + //Child should be able to share with either of their parents [RoM] + if(p->party.member[0].class_&0x2000) //first slot is the child? + p->family = p->party.member[0].char_id; + else + p->family = p->party.member[1].char_id; + } else if( p->size == 3 ) { //Check Family State. p->family = char_family( p->party.member[0].char_id, @@ -549,7 +558,7 @@ int mapif_parse_PartyAddMember(int fd, int party_id, struct party_member *member p->party.member[i].leader = 0; if (p->party.member[i].online) p->party.count++; p->size++; - if (p->size == 3) //Check family state. + if (p->size == 2 || p->size == 3) // Check family state. And also accept either of their Parents. [RoM] int_party_calc_state(p); else //Check even share range. if (member->lv < p->min_lv || member->lv > p->max_lv || p->family) { -- cgit v1.2.3-70-g09d2