diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/intif.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 62 | ||||
-rw-r--r-- | src/map/status.c | 2 | ||||
-rw-r--r-- | src/map/unit.c | 6 |
4 files changed, 35 insertions, 37 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 6d49d434d..ad749d5f9 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -118,7 +118,7 @@ int intif_rename(struct map_session_data *sd, int type, char *name) if (CheckForCharServer()) return 1; - WFIFOHEAD(inter_fd,NAME_LENGTH+11); + WFIFOHEAD(inter_fd,NAME_LENGTH+12); WFIFOW(inter_fd,0) = 0x3006; WFIFOL(inter_fd,2) = sd->status.account_id; WFIFOL(inter_fd,6) = sd->status.char_id; diff --git a/src/map/pc.c b/src/map/pc.c index 9b4b9698d..ecd82369c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4717,48 +4717,52 @@ int pc_resetstate(struct map_session_data* sd) */ int pc_resetskill(struct map_session_data* sd, int flag) { - int i, skill, inf2, skill_point=0; + int i, lv, inf2, skill_point=0; nullpo_retr(0, sd); if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd)) clif_status_load(&sd->bl, SI_DEVIL, 0); //Remove perma blindness due to skill-reset. [Skotlex] for (i = 1; i < MAX_SKILL; i++) { - if ((skill = sd->status.skill[i].lv) > 0) { - inf2 = skill_get_inf2(i); - if ((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) && - !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL))) //Avoid reseting wedding/linker skills. - { - if (!sd->status.skill[i].flag) - skill_point += skill; - else if (sd->status.skill[i].flag > 2 && sd->status.skill[i].flag != 13) - skill_point += (sd->status.skill[i].flag - 2); - if (!(flag&2)) { - sd->status.skill[i].lv = 0; - sd->status.skill[i].flag = 0; - } - } - else if (battle_config.quest_skill_reset && (inf2&INF2_QUEST_SKILL) && !(flag&2)) - { + lv= sd->status.skill[i].lv; + if (lv < 1) continue; + + inf2 = skill_get_inf2(i); + + if(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL)) //Avoid reseting wedding/linker skills. + continue; + + if (inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) + { //Only handle quest skills in a special way when you can't learn them manually + if (battle_config.quest_skill_reset && !(flag&2)) + { //Wipe them sd->status.skill[i].lv = 0; sd->status.skill[i].flag = 0; } - } else { + continue; + } + if (!sd->status.skill[i].flag) + skill_point += lv; + else if (sd->status.skill[i].flag > 2 && sd->status.skill[i].flag != 13) + skill_point += (sd->status.skill[i].flag - 2); + + if (!(flag&2)) { sd->status.skill[i].lv = 0; + sd->status.skill[i].flag = 0; } } - if (!(flag&2)) { - if (sd->status.skill_point > USHRT_MAX - skill_point) - sd->status.skill_point = USHRT_MAX; - else - sd->status.skill_point += skill_point; - - if (flag&1) { - clif_updatestatus(sd,SP_SKILLPOINT); - clif_skillinfoblock(sd); - status_calc_pc(sd,0); - } + if (flag&2 || !skill_point) return skill_point; + + if (sd->status.skill_point > USHRT_MAX - skill_point) + sd->status.skill_point = USHRT_MAX; + else + sd->status.skill_point += skill_point; + + if (flag&1) { + clif_updatestatus(sd,SP_SKILLPOINT); + clif_skillinfoblock(sd); + status_calc_pc(sd,0); } return skill_point; } diff --git a/src/map/status.c b/src/map/status.c index 9b228701c..5f53f6655 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2871,7 +2871,7 @@ void status_calc_bl_sub_hom(struct homun_data *hd, unsigned long flag) //[orn] skill = skill*status->aspd_rate/1000; status->amotion = cap_value(skill,battle_config.max_aspd,2000); - status->adelay = 2*status->amotion; + status->adelay = status->amotion; } if(flag&(SCB_AGI|SCB_DSPD)) { diff --git a/src/map/unit.c b/src/map/unit.c index a03b24d74..30c47de06 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -268,9 +268,6 @@ int unit_walktoxy( struct block_list *bl, int x, int y, int easy) { nullpo_retr(0, bl); - if ( status_isdead(bl) ) //[orn] - return 0; - ud = unit_bl2ud(bl); if( ud == NULL) return 0; @@ -678,9 +675,6 @@ int unit_can_move(struct block_list *bl) if (DIFF_TICK(ud->canmove_tick, gettick()) > 0) return 0; - if (status_isdead(bl)) - return 0; - if (sd && ( pc_issit(sd) || sd->state.blockedmove |