diff options
author | panikon <panikon@zoho.com> | 2014-07-14 18:40:54 -0300 |
---|---|---|
committer | panikon <panikon@zoho.com> | 2014-07-14 18:40:54 -0300 |
commit | 8a149e528b8a80598c6459d6c27cabbdb16a5986 (patch) | |
tree | d6535c8c311f86543078302446d0af22032b3268 | |
parent | bdb6841a114ee6f4ac029d1bbbb0ce4a6262d498 (diff) | |
download | hercules-8a149e528b8a80598c6459d6c27cabbdb16a5986.tar.gz hercules-8a149e528b8a80598c6459d6c27cabbdb16a5986.tar.bz2 hercules-8a149e528b8a80598c6459d6c27cabbdb16a5986.tar.xz hercules-8a149e528b8a80598c6459d6c27cabbdb16a5986.zip |
Fixed issues with resetskill, OPTION_RIDING wasn't being removed properly and neither were TK stances. Issue: 8264 http://hercules.ws/board/tracker/issue-8264-reset-skill-bug-peco-peco-and-some-skills/
-rw-r--r-- | src/map/pc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index c23e510d6..4e165e539 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6617,7 +6617,7 @@ int pc_resetskill(struct map_session_data* sd, int flag) if( pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd) ) //Remove perma blindness due to skill-reset. [Skotlex] clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_DEVIL1); i = sd->sc.option; - if( i&OPTION_RIDING && (!pc->checkskill(sd, KN_RIDING) || (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) ) + if( i&OPTION_RIDING && pc->checkskill(sd, KN_RIDING) ) i &= ~OPTION_RIDING; if( i&OPTION_FALCON && pc->checkskill(sd, HT_FALCON) ) i &= ~OPTION_FALCON; @@ -6695,6 +6695,21 @@ int pc_resetskill(struct map_session_data* sd, int flag) sd->status.skill_point += skill_point; + + if( !(flag&2) ) { + // Remove all SCs that can't be inactivated without a skill + if( sd->sc.data[SC_STORMKICK_READY] ) + status_change_end(&sd->bl, SC_STORMKICK_READY, INVALID_TIMER); + if( sd->sc.data[SC_DOWNKICK_READY] ) + status_change_end(&sd->bl, SC_DOWNKICK_READY, INVALID_TIMER); + if( sd->sc.data[SC_TURNKICK_READY] ) + status_change_end(&sd->bl, SC_TURNKICK_READY, INVALID_TIMER); + if( sd->sc.data[SC_COUNTERKICK_READY] ) + status_change_end(&sd->bl, SC_COUNTERKICK_READY, INVALID_TIMER); + if( sd->sc.data[SC_DODGE_READY] ) + status_change_end(&sd->bl, SC_DODGE_READY, INVALID_TIMER); + } + if( flag&1 ) { clif->updatestatus(sd,SP_SKILLPOINT); clif->skillinfoblock(sd); |