diff --git a/src/map/skill.c b/src/map/skill.c index b273963709..a3e27a6fa8 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -16269,7 +16269,7 @@ int skill_castfix_sc(struct block_list *bl, double time, uint8 flag) if (time < 0) return 0; - if (bl->type == BL_MOB) + if (bl->type == BL_MOB || bl->type == BL_NPC) return (int)time; if (sc && sc->count) { @@ -16322,7 +16322,7 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 if (time < 0) return 0; - if (bl->type == BL_MOB) + if (bl->type == BL_MOB || bl->type == BL_NPC) return (int)time; if (fixed < 0 || !battle_config.default_fixed_castrate) // no fixed cast time diff --git a/src/map/unit.c b/src/map/unit.c index 94693620e5..b3318cbb38 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1819,9 +1819,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui casttime = skill_vfcastfix(src, casttime, skill_id, skill_lv); #endif - if (src->type == BL_NPC) // NPC-objects do not have cast time - casttime = 0; - if(!ud->state.running) // Need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026 unit_stop_walking(src, 1); // Even though this is not how official works but this will do the trick. bugreport:6829 @@ -2034,9 +2031,6 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui casttime = skill_vfcastfix(src, casttime, skill_id, skill_lv ); #endif - if (src->type == BL_NPC) // NPC-objects do not have cast time - casttime = 0; - ud->state.skillcastcancel = castcancel&&casttime>0?1:0; if (!sd || sd->skillitem != skill_id || skill_get_cast(skill_id, skill_lv)) ud->canact_tick = tick + max(casttime, max(status_get_amotion(src), battle_config.min_skill_delay_limit)) + SECURITY_CASTTIME;