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://svn.code.sf.net/p/rathena/svn/trunk@15029 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind
2011-12-08 18:06:20 +00:00
parent 2f758a3354
commit e3a1f1ca8c

View File

@@ -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) {