diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-04-21 06:55:10 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-10 21:30:33 +0200 |
commit | 505122c96f725384d7687c55f2cb92d3b0ae0a8b (patch) | |
tree | 70afcab3f250bee61c3a5c31ba391bb4aab56f7e /src/map/unit.c | |
parent | 77d59bad5d27a528fb503e19807bfc07cf2077b1 (diff) | |
download | hercules-505122c96f725384d7687c55f2cb92d3b0ae0a8b.tar.gz hercules-505122c96f725384d7687c55f2cb92d3b0ae0a8b.tar.bz2 hercules-505122c96f725384d7687c55f2cb92d3b0ae0a8b.tar.xz hercules-505122c96f725384d7687c55f2cb92d3b0ae0a8b.zip |
Add pc_autocast_remove() calls
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; } |