Hello, my server has a season character system, and the character's rate is different from that of the others, so I would like to prevent it from being adopted, so that there is no abuse to quickly increase the Rank using the marriage system and adoption.
In src\map\pc.cpp I found where the restrictions are...
Can I read here the single variable that I define in the character during his creation to return negative and not let him be adopted or make a query in MySQL on the "char_reg_num" table to validate his rate and block it?
enum adopt_responses pc_try_adopt(map_session_data *p1_sd, map_session_data *p2_sd, map_session_data *b_sd){if(!p1_sd ||!p2_sd ||!b_sd )return ADOPT_CHARACTER_NOT_FOUND;if( b_sd->status.father || b_sd->status.mother || b_sd->adopt_invite )return ADOPT_ALREADY_ADOPTED;// already adopted baby / in adopt requestif(!p1_sd->status.partner_id ||!p1_sd->status.party_id || p1_sd->status.party_id != b_sd->status.party_id )return ADOPT_MARRIED_AND_PARTY;// You need to be married and in party with baby to adoptif( p1_sd->status.partner_id != p2_sd->status.char_id || p2_sd->status.partner_id != p1_sd->status.char_id )return ADOPT_MARRIED_AND_PARTY;// Not married, wrong marriedif( p2_sd->status.party_id != p1_sd->status.party_id )return ADOPT_MARRIED_AND_PARTY;// Both parents need to be in the same party// Parents need to have their ring equippedif(!pc_isequipped(p1_sd, WEDDING_RING_M)&&!pc_isequipped(p1_sd, WEDDING_RING_F))return ADOPT_EQUIP_RINGS;if(!pc_isequipped(p2_sd, WEDDING_RING_M)&&!pc_isequipped(p2_sd, WEDDING_RING_F))return ADOPT_EQUIP_RINGS;// Already adopted a babyif( p1_sd->status.child || p2_sd->status.child ){
clif_Adopt_reply(p1_sd, ADOPT_REPLY_MORE_CHILDREN);return ADOPT_MORE_CHILDREN;}// Parents need at least lvl 70 to adoptif( p1_sd->status.base_level <70|| p2_sd->status.base_level <70){
clif_Adopt_reply(p1_sd, ADOPT_REPLY_LEVEL_70);return ADOPT_LEVEL_70;}if( b_sd->status.partner_id ){
clif_Adopt_reply(p1_sd, ADOPT_REPLY_MARRIED);return ADOPT_MARRIED;}if(!(( b_sd->status.class_ >= JOB_NOVICE && b_sd->status.class_ <= JOB_THIEF )|| b_sd->status.class_ == JOB_SUPER_NOVICE || b_sd->status.class_ == JOB_SUPER_NOVICE_E ))return ADOPT_NOT_NOVICE;return ADOPT_ALLOWED;}
What syntax can I use to query variables here or make a query in the db?
Question
WoflRoom
Hello, my server has a season character system, and the character's rate is different from that of the others, so I would like to prevent it from being adopted, so that there is no abuse to quickly increase the Rank using the marriage system and adoption.
In src\map\pc.cpp I found where the restrictions are...
Can I read here the single variable that I define in the character during his creation to return negative and not let him be adopted or make a query in MySQL on the "char_reg_num" table to validate his rate and block it?
What syntax can I use to query variables here or make a query in the db?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.