summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index f7df711b3..4f500a2ba 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1513,7 +1513,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
//Set canact delay. [Skotlex]
ud = unit_bl2ud(src);
if (ud) {
- rate = skill_delayfix(src, skill, skilllv);
+ rate = skill_delayfix(src, skill, skilllv, true);
if (DIFF_TICK(ud->canact_tick, tick + rate) < 0)
ud->canact_tick = tick+rate;
}
@@ -1689,7 +1689,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
//Set canact delay. [Skotlex]
ud = unit_bl2ud(bl);
if (ud) {
- rate = skill_delayfix(bl, skillid, skilllv);
+ rate = skill_delayfix(bl, skillid, skilllv, true);
if (DIFF_TICK(ud->canact_tick, tick + rate) < 0)
ud->canact_tick = tick+rate;
}
@@ -5910,7 +5910,7 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
if (ud->walktimer != -1 && ud->skillid != TK_RUN)
unit_stop_walking(src,1);
- ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
+ ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv, tid == -1);
if (skill_get_state(ud->skillid) != ST_MOVE_ENABLE)
unit_set_walkdelay(src, tick, battle_config.default_skill_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
@@ -6079,7 +6079,7 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data)
ShowInfo("Type %d, ID %d skill castend pos [id =%d, lv=%d, (%d,%d)]\n",
src->type, src->id, ud->skillid, ud->skilllv, ud->skillx, ud->skilly);
unit_stop_walking(src,1);
- ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
+ ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv, tid == -1);
unit_set_walkdelay(src, tick, battle_config.default_skill_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
map_freeblock_lock();
@@ -8855,7 +8855,7 @@ int skill_castfix_sc (struct block_list *bl, int time)
/*==========================================
* Does delay reductions based on dex/agi, sc data, item bonuses, ...
*------------------------------------------*/
-int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
+int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv, bool instantcast)
{
int delaynodex = skill_get_delaynodex(skill_id, skill_lv);
int time = skill_get_delay(skill_id, skill_lv);
@@ -8865,14 +8865,14 @@ int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
if (bl->type&battle_config.no_skill_delay)
return battle_config.min_skill_delay_limit;
- // instant cast attack skills depend on aspd as delay [celest]
+ // instant delay skills have aspd delay IF they were also instant cast (reported by Tharis) [Skotlex]
if (time == 0) {
- if (skill_get_type(skill_id)&(BF_WEAPON|BF_MISC) && !(skill_get_nk(skill_id)&NK_NO_DAMAGE))
- time = status_get_adelay(bl); //Use attack delay as default delay.
+ if (instantcast)
+ time = status_get_amotion(bl); //Use attack delay.
else
time = battle_config.default_skill_delay;
} else if (time < 0)
- time = -time + status_get_amotion(bl); // if set to <0, the attack motion is added.
+ time = -time + status_get_amotion(bl); // if set to <0, add to attack motion.
else //Agi reduction should apply only to non-zero delay skills.
switch (skill_id)
{ //Monk combo skills have their delay reduced by agi/dex.