diff options
-rw-r--r-- | Changelog.txt | 3 | ||||
-rw-r--r-- | Dev/bugs.txt | 4 | ||||
-rw-r--r-- | src/map/map.h | 4 | ||||
-rw-r--r-- | src/map/pc.c | 23 |
4 files changed, 26 insertions, 8 deletions
diff --git a/Changelog.txt b/Changelog.txt index 5a3d6d0b6..7ad0caff3 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,9 @@ Date Added 11/18 + * *Hopefully* fixed the skill tree problem where you have to use 49 skill + points first before 2nd job skills will show... please report any bugs found + with it, thank you. [celest] * Added flag to pc_unequipitem (thanks to DracoRPG for suggestion) [celest] * Skill updates [celest] - Updated Cloaking (thanks to orn), Endure diff --git a/Dev/bugs.txt b/Dev/bugs.txt index 97b053a98..3aa605ea4 100644 --- a/Dev/bugs.txt +++ b/Dev/bugs.txt @@ -15,8 +15,8 @@ Assigned: N/A Progess: 0% Problem: Pre skill requirements for new skills are wrong it makes you use 49 skills points before you can get the newer skills. -Assigned: N/A -Progess: 0% +Assigned: Celest +Progess: ~90% (Notes: not sure if it causes problems, need more testing =p) Problem: Monster hp view only shows but does not go down with a hit. Assigned: N/A diff --git a/src/map/map.h b/src/map/map.h index da9ba3777..e7f1811ee 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -311,7 +311,9 @@ struct map_session_data { int last_skillid,last_skilllv; // Added by RoVeRT short sg_count; - + + unsigned char change_level; // [celest] + #ifndef TXT_ONLY int mail_counter; // mail counter for mail system [Valaris] #endif diff --git a/src/map/pc.c b/src/map/pc.c index 863f48ce1..b38d283b7 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -707,6 +707,8 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars sd->doridori_counter = 0; + sd->change_level = pc_readglobalreg(sd,"jobchange_level"); + #ifndef TXT_ONLY // mail system [Valaris] if(battle_config.mail_system) sd->mail_counter = 0; @@ -913,7 +915,8 @@ int pc_calc_skilltree(struct map_session_data *sd) if(skill_point < 9) c = 0; //else if((sd->status.skill_point >= sd->status.job_level && skill_point < 58) && ((c > 6 && c < 23) || (c > 4007 && c < 4023) || (c > 4029 && c < 4045))) { - else if ((sd->status.skill_point >= sd->status.job_level && skill_point < 58) && (c > 6 && c < 23)) { + //else if ((sd->status.skill_point >= sd->status.job_level && skill_point < 58) && (c > 6 && c < 23)) { + else if ((sd->status.skill_point >= sd->status.job_level && skill_point < sd->change_level+8) && (c > 6 && c < 23)) { switch(c) { case 7: case 14: @@ -5602,12 +5605,12 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) int i; int b_class = 0; //転生や養子の場合の元の職業を算出する - //struct pc_base_job s_class = pc_calc_base_job(sd->status.class); + struct pc_base_job s_class = pc_calc_base_job(sd->status.class); nullpo_retr(0, sd); if (upper < 0 || upper > 2) //現在転生かどうかを判断する - upper = pc_calc_upper (sd->status.class); + upper = s_class.upper; b_class = job; //通常職ならjobそのまんま if (job < 23) { @@ -5615,7 +5618,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) b_class += 4001; else if (upper == 2) //養子に結婚はないけどどうせ次で蹴られるからいいや b_class += 4023; - } else if (job == 23) { + } else if (job == 23) { if (upper == 1) //転生にスパノビは存在しないのでお断り return 1; else if (upper == 2) @@ -5625,10 +5628,20 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) } else if ((job >= 69 && job < 4001) || (job > 4045)) return 1; + job = pc_calc_base_job2 (b_class); // check base class [celest] + if((sd->status.sex == 0 && job == 19) || (sd->status.sex == 1 && job == 20) || - (sd->status.sex == 0 && job == 4020) || (sd->status.sex == 1 && job == 4021) || + // not needed [celest] + //(sd->status.sex == 0 && job == 4020) || (sd->status.sex == 1 && job == 4021) || job == 22 || sd->status.class == b_class) //♀はバードになれない、♂はダンサーになれない、結婚衣裳もお断り return 1; + + // check if we are changing from 1st to 2nd job + if (s_class.job > 0 && s_class.job < 7 && job >= 7 && job <= 21) + sd->change_level = sd->status.job_level; + else + sd->change_level = 0; + pc_setglobalreg (sd, "jobchange_level", sd->change_level); sd->status.class = sd->view_class = b_class; |