diff --git a/src/map/unit.c b/src/map/unit.c index fb6d992aeac..ee705412d88 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1155,7 +1155,7 @@ 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) + if (sd != NULL && ret == 0) pc->autocast_remove(sd, sd->auto_cast_current.type, sd->auto_cast_current.skill_id, sd->auto_cast_current.skill_lv); @@ -1793,7 +1793,7 @@ 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) + if (sd != NULL && ret == 0) pc->autocast_remove(sd, sd->auto_cast_current.type, sd->auto_cast_current.skill_id, sd->auto_cast_current.skill_lv);