From 452dd304e008c4844ff2e923ff16a6f540ffe87d Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Tue, 2 Jun 2020 05:31:57 +0200 Subject: Don't use unit's skill data before it's set in unit_skilluse_id2() and unit_skilluse_pos2() --- src/map/unit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map') 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) ) -- cgit v1.2.3-70-g09d2 From 147a491a8c57a2d33b5a65b310b5b948e873db10 Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Tue, 2 Jun 2020 05:37:35 +0200 Subject: Make DamageType defaults to NK_NONE --- db/pre-re/skill_db.conf | 2 +- db/re/skill_db.conf | 2 +- src/map/skill.c | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/map') diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index 446df3c86..36b877f94 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -87,7 +87,7 @@ "Ele_Weapon" - Uses weapon's element. "Ele_Endowed" - Uses Endowed element. "Ele_Random" - Uses random element. - DamageType: { (bool, default to "NoDamage") + DamageType: { (bool, default to "NK_NONE") NoDamage: true/false No damage skill SplashArea: true/false Has splash area (requires source modification) SplitDamage: true/false Damage should be split among targets (requires 'SplashArea' in order to work) diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index ecca6e2e4..467dd0c38 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -87,7 +87,7 @@ "Ele_Weapon" - Uses weapon's element. "Ele_Endowed" - Uses Endowed element. "Ele_Random" - Uses random element. - DamageType: { (bool, default to "NoDamage") + DamageType: { (bool, default to "NK_NONE") NoDamage: true/false No damage skill SplashArea: true/false Has splash area (requires source modification) SplitDamage: true/false Damage should be split among targets (requires 'SplashArea' in order to work) 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; } /** -- cgit v1.2.3-70-g09d2