diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-08 18:06:20 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-08 18:06:20 +0000 |
commit | c6e5d51e40a8e8e36af20abd39dc1bd44c863f64 (patch) | |
tree | ffe40b9d79af32b3e3953cb2217d1ba732d0be70 | |
parent | a75c6a7b068acab0a00b9f211147641d3ac63fcb (diff) | |
download | hercules-c6e5d51e40a8e8e36af20abd39dc1bd44c863f64.tar.gz hercules-c6e5d51e40a8e8e36af20abd39dc1bd44c863f64.tar.bz2 hercules-c6e5d51e40a8e8e36af20abd39dc1bd44c863f64.tar.xz hercules-c6e5d51e40a8e8e36af20abd39dc1bd44c863f64.zip |
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
-rw-r--r-- | src/char_sql/int_party.c | 15 |
1 files 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;i<MAX_PARTY;i++){ - if(!p->party.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) { |