diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-17 02:09:06 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-06-01 02:01:55 +0200 |
commit | 529401c53e79ed848cea6dfaab75366d05174a43 (patch) | |
tree | b0e8cd2f1f07ddf1f39494b79a15b0204927bba3 /src/map/unit.c | |
parent | a30f969b07c2d4e0f7e3189c5566fb50738babde (diff) | |
download | hercules-529401c53e79ed848cea6dfaab75366d05174a43.tar.gz hercules-529401c53e79ed848cea6dfaab75366d05174a43.tar.bz2 hercules-529401c53e79ed848cea6dfaab75366d05174a43.tar.xz hercules-529401c53e79ed848cea6dfaab75366d05174a43.zip |
Make Requirements->State can be grouped by levels
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 223a4a82b..a6afb5ee7 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1567,7 +1567,7 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill //Check range when not using skill on yourself or is a combo-skill during attack //(these are supposed to always have the same range as your attack) if( src->id != target_id && (!temp || ud->attacktimer == INVALID_TIMER) ) { - if( skill->get_state(ud->skill_id) == ST_MOVE_ENABLE ) { + if (skill->get_state(ud->skill_id, ud->skill_lv) == ST_MOVE_ENABLE) { if( !unit->can_reach_bl(src, target, range + 1, 1, NULL, NULL) ) return 0; // Walk-path check failed. } else if( src->type == BL_MER && skill_id == MA_REMOVETRAP ) { @@ -1872,7 +1872,7 @@ static int unit_skilluse_pos2(struct block_list *src, short skill_x, short skill return 0; // Attacking will be handled by unit_walk_toxy_timer in this case } - if( skill->get_state(ud->skill_id) == ST_MOVE_ENABLE ) { + if (skill->get_state(ud->skill_id, ud->skill_lv) == ST_MOVE_ENABLE) { if( !unit->can_reach_bl(src, &bl, range + 1, 1, NULL, NULL) ) return 0; //Walk-path check failed. } else if( !battle->check_range(src, &bl, range) ) |