diff options
author | Haru <haru@dotalux.com> | 2020-06-03 22:51:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 22:51:20 +0200 |
commit | 789d7620b25220f842ea71264e6f992a8222cb4f (patch) | |
tree | cfec2aed893835d14cc23c835a93c8bf33c5b06c /src/map | |
parent | 3635ef96887de748ac053e1ebd51f0deed7f9b6c (diff) | |
parent | 147a491a8c57a2d33b5a65b310b5b948e873db10 (diff) | |
download | hercules-789d7620b25220f842ea71264e6f992a8222cb4f.tar.gz hercules-789d7620b25220f842ea71264e6f992a8222cb4f.tar.bz2 hercules-789d7620b25220f842ea71264e6f992a8222cb4f.tar.xz hercules-789d7620b25220f842ea71264e6f992a8222cb4f.zip |
Merge pull request #2761 from Kenpachi2k13/skill_fix
Fix wrong usage of unit skill data and default skill damage type to NK_NONE
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/skill.c | 3 | ||||
-rw-r--r-- | src/map/unit.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 25d10b825..24fbe7892 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -21208,9 +21208,6 @@ static void skill_validate_damagetype(struct config_setting_t *conf, struct s_sk } } } - - if (sk->nk == NK_NONE) - sk->nk = NK_NO_DAMAGE; } /** diff --git a/src/map/unit.c b/src/map/unit.c index c23e96aee..fb6d992ae 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1566,7 +1566,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, ud->skill_lv) == ST_MOVE_ENABLE) { + if (skill->get_state(skill_id, 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 ) { @@ -1871,7 +1871,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, ud->skill_lv) == ST_MOVE_ENABLE) { + if (skill->get_state(skill_id, 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) ) |