diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 8 | ||||
-rw-r--r-- | src/map/unit.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 6ca0eda3a..df46f2212 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5834,7 +5834,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data) if (ud->walktimer != -1 && ud->skillid != TK_RUN) unit_stop_walking(src,1); - if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) ) + if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) ) ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv); //Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish] if( battle_config.display_status_timers && sd ) clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv)); @@ -5928,7 +5928,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data) } ud->skillid = ud->skilllv = ud->skilltarget = 0; - if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) ) + if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) ) ud->canact_tick = tick; //You can't place a skill failed packet here because it would be //sent in ALL cases, even cases where skill_check_condition fails @@ -6046,7 +6046,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr data) if (ud->walktimer != -1) unit_stop_walking(src,1); - if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) ) + if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) ) ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv); if( battle_config.display_status_timers && sd ) clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv)); @@ -6077,7 +6077,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr data) return 1; } while(0); - if( sd->skillitem == ud->skillid && skill_get_delay(ud->skillid,ud->skilllv) ) + if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) ) ud->canact_tick = tick; ud->skillid = ud->skilllv = 0; if(sd) diff --git a/src/map/unit.c b/src/map/unit.c index 21bf5c750..9a637fd60 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1074,7 +1074,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh if( casttime <= 0 ) ud->state.skillcastcancel = 0; - if( sd->skillitem == skill_num && skill_get_cast(skill_num,skill_lv) ) + if( !sd || sd->skillitem != ud->skillid || skill_get_cast(skill_num,skill_lv) ) ud->canact_tick = tick + casttime + 100; if( sd ) { @@ -1180,7 +1180,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh casttime = skill_castfix_sc(src, casttime); ud->state.skillcastcancel = castcancel&&casttime>0?1:0; - if( sd->skillitem == skill_num && skill_get_cast(skill_num,skill_lv) ) + if( !sd || sd->skillitem != ud->skillid || skill_get_cast(skill_num,skill_lv) ) ud->canact_tick = tick + casttime + 100; // if( sd ) // { |