Originally posted by [b]Lipstick[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4414
Missing check level for pc_can_adopt(pc.c)
CODE
bool pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd )
{
if( !p1_sd || !p2_sd || !b_sd )
return false;
if( b_sd->status.father || b_sd->status.mother || b_sd->adopt_invite )
return false; // already adopted baby / in adopt request
if( !p1_sd->status.partner_id || !p1_sd->status.party_id || p1_sd->status.party_id != b_sd->status.party_id )
return false; // You need to be married and in party with baby to adopt
if( p1_sd->status.partner_id != p2_sd->status.char_id || p2_sd->status.partner_id != p1_sd->status.char_id )
return false; // Not married, wrong married
if( p2_sd->status.party_id != p1_sd->status.party_id )
return false; // Both parents need to be in the same party
// Parents need to have their ring equipped
if( !pc_isequipped(p1_sd, WEDDING_RING_M) && !pc_isequipped(p1_sd, WEDDING_RING_F) )
return false;
if( !pc_isequipped(p2_sd, WEDDING_RING_M) && !pc_isequipped(p2_sd, WEDDING_RING_F) )
return false;
// Already adopted a baby
if( p1_sd->status.child || p2_sd->status.child ) {
clif_Adopt_reply(p1_sd, 0);
return false;
}
// Parents need at least lvl 70 to adopt
if( p1_sd->status.base_level < 70 || p2_sd->status.base_level < 70 ) {
clif_Adopt_reply(p1_sd, 1);
return false;
}
if( b_sd->status.partner_id ) {
clif_Adopt_reply(p1_sd, 2);
return false;
}
if( !(b_sd->status.class_ >= JOB_NOVICE && b_sd->status.class_ <= JOB_THIEF) )
return false;
return true;
}
As far as i know supposed to be:
CODE
if( b_sd->status.base_level > max_level[pc_class2idx(4023)][0] )
return false;
If ur level is further than maxlevel for babys u can bypass the edge and goes till max for common jobs
This post has been edited by Lipstick: Aug 27 2010, 06:35 PM