diff options
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 530fa5f1a..53e517045 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1156,10 +1156,9 @@ static int unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_ int ret = unit->skilluse_id2(src, target_id, skill_id, skill_lv, casttime, castcancel); struct map_session_data *sd = BL_CAST(BL_PC, src); - if (sd != NULL && ret == 0) - pc->autocast_clear(sd); // Error in unit_skilluse_id2(). - else if (sd != NULL && ret != 0 && skill_id != SA_ABRACADABRA && skill_id != WM_RANDOMIZESPELL) - skill->validate_autocast_data(sd, skill_id, skill_lv); + if (sd != NULL) + pc->autocast_remove(sd, sd->auto_cast_current.type, sd->auto_cast_current.skill_id, + sd->auto_cast_current.skill_lv); return ret; } @@ -1795,10 +1794,9 @@ static int unit_skilluse_pos(struct block_list *src, short skill_x, short skill_ int ret = unit->skilluse_pos2(src, skill_x, skill_y, skill_id, skill_lv, casttime, castcancel); struct map_session_data *sd = BL_CAST(BL_PC, src); - if (sd != NULL && ret == 0) - pc->autocast_clear(sd); // Error in unit_skilluse_pos2(). - else if (sd != NULL && ret != 0 && skill_id != SA_ABRACADABRA && skill_id != WM_RANDOMIZESPELL) - skill->validate_autocast_data(sd, skill_id, skill_lv); + if (sd != NULL) + pc->autocast_remove(sd, sd->auto_cast_current.type, sd->auto_cast_current.skill_id, + sd->auto_cast_current.skill_lv); return ret; } |